1
0

17 lines
682 B
C#

using RhSolutions.SkuParser.Abstractions;
using RhSolutions.SkuParser.Api.Services;
using RhSolutions.SkuParser.Services;
var builder = WebApplication.CreateBuilder(args);
builder.Configuration
.AddJsonFile("appsettings.json");
builder.Services
.AddKeyedScoped<ISkuParser, CommonCsvParser>("text/csv")
.AddKeyedScoped<ISkuParser, CommonExcelParser>("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
.AddKeyedScoped<ISkuParser, CommonExcelParser>("application/vnd.ms-excel.sheet.macroenabled.12")
.AddKeyedScoped<ISkuParser, BsExcelParser>("BS");
builder.Services.AddControllers();
var app = builder.Build();
app.MapControllers();
app.Run();