From ee7db2cdcae8dfd7db6c211c54f42904503f018a Mon Sep 17 00:00:00 2001 From: alexinea Date: Fri, 10 Jan 2020 17:22:03 +0800 Subject: [PATCH] Remove Build, BeforeBuild and AfterBuild method from II18NServiceCollection interface. --- .../Console/Core/SoloDependencyContainer.cs | 4 +--- .../Cosmos/I18N/Core/II18NServiceCollection.cs | 18 ------------------ 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/Cosmos.I18N.Extensions.Console/Cosmos/I18N/Extensions/Console/Core/SoloDependencyContainer.cs b/src/Cosmos.I18N.Extensions.Console/Cosmos/I18N/Extensions/Console/Core/SoloDependencyContainer.cs index 05eed0c..acc7dea 100644 --- a/src/Cosmos.I18N.Extensions.Console/Cosmos/I18N/Extensions/Console/Core/SoloDependencyContainer.cs +++ b/src/Cosmos.I18N.Extensions.Console/Cosmos/I18N/Extensions/Console/Core/SoloDependencyContainer.cs @@ -32,10 +32,8 @@ internal static void AllDone(II18NServiceCollection services) { s.AddSingleton(provider => new TranslationProcessor(provider.GetServices().ToDictionary(package => package.PackageKey.GetHashCode()))); }); - + SetResolver(serviceImpl.Build()); } - - SetResolver(services.Build()); } public static IServiceProvider GetServiceResolver() => ServiceResolver ?? throw new NullReferenceException(nameof(ServiceResolver)); diff --git a/src/Cosmos.I18N/Cosmos/I18N/Core/II18NServiceCollection.cs b/src/Cosmos.I18N/Cosmos/I18N/Core/II18NServiceCollection.cs index 60de6fe..6297b34 100644 --- a/src/Cosmos.I18N/Cosmos/I18N/Core/II18NServiceCollection.cs +++ b/src/Cosmos.I18N/Cosmos/I18N/Core/II18NServiceCollection.cs @@ -31,23 +31,5 @@ public interface II18NServiceCollection { /// /// II18NServiceCollection AddDependency(Action servicesAction); - - /// - /// Build - /// - /// - IServiceProvider Build(); - - /// - /// Before build - /// - /// - void BeforeBuild(Action serviceAct); - - /// - /// After build - /// - /// - void AfterBuild(Action providerAct); } } \ No newline at end of file