DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="5.0.1" />

.NET API 493,976 bytes

 ServiceProviderFactory

public static class ServiceProviderFactory
Represents various ways for building IServiceProvider implementations.

Represents builder of the service provider.

public static readonly IServiceProvider Empty

Represents empty service provider.

public static IServiceProvider Create<T>(T service, IServiceProvider fallback = null)

Creates service provider containing the single service.

public static IServiceProvider Create<T1, T2>(T1 service1, T2 service2, IServiceProvider fallback = null)

Creates service provider containing the two services.

public static IServiceProvider Create<T1, T2, T3>(T1 service1, T2 service2, T3 service3, IServiceProvider fallback = null)

Creates service provider containing the three services.

public static IServiceProvider Create<T1, T2, T3, T4>(T1 service1, T2 service2, T3 service3, T4 service4, IServiceProvider fallback = null)

Creates service provider containing the four services.

public static IServiceProvider Create<T1, T2, T3, T4, T5>(T1 service1, T2 service2, T3 service3, T4 service4, T5 service5, IServiceProvider fallback = null)

Creates service provider containing the four services.

Creates factory that can be used to construct delegating service provider.

Creates factory that can be used to construct delegating service provider.

Creates factory that can be used to construct delegating service provider.

public static Func<T1, T2, T3, IServiceProvider, IServiceProvider> CreateDelegatingFactory<T1, T2, T3>()

Creates factory that can be used to construct delegating service provider.

public static Func<T1, T2, T3, T4, IServiceProvider, IServiceProvider> CreateDelegatingFactory<T1, T2, T3, T4>()

Creates factory that can be used to construct delegating service provider.

public static Func<T1, T2, T3, T4, T5, IServiceProvider, IServiceProvider> CreateDelegatingFactory<T1, T2, T3, T4, T5>()

Creates factory that can be used to construct delegating service provider.

public static Func<object[], IServiceProvider> CreateFactory(Type[] types)

Creates factory that can be used to construct the service provider.

public static Func<T, IServiceProvider> CreateFactory<T>()

Creates factory that can be used to construct the service provider.

public static Func<T1, T2, IServiceProvider> CreateFactory<T1, T2>()

Creates factory that can be used to construct the service provider.

public static Func<T1, T2, T3, IServiceProvider> CreateFactory<T1, T2, T3>()

Creates factory that can be used to construct the service provider.

public static Func<T1, T2, T3, T4, IServiceProvider> CreateFactory<T1, T2, T3, T4>()

Creates factory that can be used to construct the service provider.

public static Func<T1, T2, T3, T4, T5, IServiceProvider> CreateFactory<T1, T2, T3, T4, T5>()

Creates factory that can be used to construct the service provider.

public static IServiceProvider FromTuple<T>(T tuple, IServiceProvider fallback = null) where T : struct, ITuple

Creates service provider from the tuple.