summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RhSolutions.Api/Program.cs2
-rw-r--r--RhSolutions.Parsers.Tests/TestServiceCollection.cs2
-rw-r--r--RhSolutions.Parsers/ParsersRegistration.cs6
3 files changed, 5 insertions, 5 deletions
diff --git a/RhSolutions.Api/Program.cs b/RhSolutions.Api/Program.cs
index 19268bc..62fb0e4 100644
--- a/RhSolutions.Api/Program.cs
+++ b/RhSolutions.Api/Program.cs
@@ -32,7 +32,7 @@ builder.Services.AddIdentity<IdentityUser, IdentityRole>()
builder.Services.AddScoped<IPricelistParser, ClosedXMLParser>()
.AddScoped<IProductTypePredicter, ProductTypePredicter>();
-builder.Services.AddModifiers();
+builder.Services.AddProductParsers();
builder.Services.AddControllers();
builder.Services.AddSwaggerGen(options =>
{
diff --git a/RhSolutions.Parsers.Tests/TestServiceCollection.cs b/RhSolutions.Parsers.Tests/TestServiceCollection.cs
index 9f15c89..3ea95e8 100644
--- a/RhSolutions.Parsers.Tests/TestServiceCollection.cs
+++ b/RhSolutions.Parsers.Tests/TestServiceCollection.cs
@@ -11,7 +11,7 @@ public class TestServiceCollection
public void CreateProvider()
{
var collection = new ServiceCollection();
- collection.AddModifiers();
+ collection.AddProductParsers();
ServiceProvider = collection.BuildServiceProvider();
}
diff --git a/RhSolutions.Parsers/ParsersRegistration.cs b/RhSolutions.Parsers/ParsersRegistration.cs
index 54f34be..b61e503 100644
--- a/RhSolutions.Parsers/ParsersRegistration.cs
+++ b/RhSolutions.Parsers/ParsersRegistration.cs
@@ -5,7 +5,7 @@ namespace RhSolutions.Parsers;
public static class ParsersRegistration
{
- public static void AddModifiers(this IServiceCollection services)
+ public static void AddProductParsers(this IServiceCollection services)
{
var types = AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(s => s.GetTypes())
@@ -13,12 +13,12 @@ public static class ParsersRegistration
foreach (Type t in types)
{
- string key = GetModifierKey(t);
+ string key = GetParserKey(t);
services.AddKeyedTransient(typeof(IProductParser), key, t);
}
}
- private static string GetModifierKey(Type t)
+ private static string GetParserKey(Type t)
{
return t.GetCustomAttribute<ParserKey>()?.Value ?? string.Empty;
}