blob: 9909765a59c61bd75f970e39f1af5cc2b2a11d3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
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();
builder.Services.AddHealthChecks();
var app = builder.Build();
app.MapControllers();
app.MapHealthChecks("/healthy");
app.Run();
|