Hello!
First, thanks for a Scrutor)
Is it any way for register services with ImplementationFactory, like in native IServiceCollectionmethod ?
AddSingleton<TService>(Func<IServiceProvider, TService> implementationFactory)
I imagine that like:
IServiceCollection collection = _serviceCollection.Scan(scan => scan.FromAssemblies(ass)
.AddClasses(classes => classes.AssignableTo<TService>(), false)
.AsImplementedInterfaces()
.WithSingletonLifetime(Func<IServiceProvider, TService> implementationFactory))
instead WithSingletonLifetime()
Hello!
First, thanks for a Scrutor)
Is it any way for register services with ImplementationFactory, like in native
IServiceCollectionmethod ?AddSingleton<TService>(Func<IServiceProvider, TService> implementationFactory)I imagine that like:
instead
WithSingletonLifetime()