public static IServiceCollection RegisterServices( this IServiceCollection services) { services.AddTransient <Func <string, IServiceConfiguration> >(factory => { return(key => ServiceConfigurationFactory .GetSettings <ServiceConfiguration>(Constants.ConfigurationSection) .GetConfiguration(key)); }); services.AddTransient <BasicServiceTask>(); services.AddSingleton <ILogger, Logger4NetAdapter>(); return(services); }