feat(ExcelIO): register ExcelMapRegistry and FluentTableWriter in DI
This commit is contained in:
@@ -3,6 +3,8 @@ using JdeScoping.ExcelIO;
|
||||
using JdeScoping.ExcelIO.Options;
|
||||
using JdeScoping.ExcelIO.Generators;
|
||||
using JdeScoping.ExcelIO.Helpers;
|
||||
using JdeScoping.ExcelIO.Mapping;
|
||||
using JdeScoping.ExcelIO.Mapping.Maps;
|
||||
using JdeScoping.ExcelIO.Parsing;
|
||||
using JdeScoping.ExcelIO.Templates;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
@@ -45,6 +47,19 @@ public static class ExcelIODependencyInjection
|
||||
services.AddSingleton<AttributeTableWriter>();
|
||||
services.AddSingleton<DataEntryTemplateGenerator>();
|
||||
|
||||
// Register Excel map registry with all maps
|
||||
services.AddSingleton(sp =>
|
||||
{
|
||||
var registry = new ExcelMapRegistry();
|
||||
registry.Register(new SearchResultMap());
|
||||
registry.Register(new MisSearchResultMap());
|
||||
registry.Register(new MisNonMatchSearchResultMap());
|
||||
return registry;
|
||||
});
|
||||
|
||||
// Register fluent table writer
|
||||
services.AddSingleton<FluentTableWriter>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user