Represents various ways for building IServiceProvider implementations.
InheritanceServiceProviderFactory
Namespace: DotNext Assembly: DotNext.dll Syntaxpublic static class ServiceProviderFactory
Fields | Edit this page View Source Empty
Represents empty service provider.
Declarationpublic static readonly IServiceProvider Empty
Field Value Methods | Edit this page View Source CreateDelegatingFactory(params Type[])
Creates factory that can be used to construct delegating service provider.
Declarationpublic static Func<object[], IServiceProvider, IServiceProvider> CreateDelegatingFactory(params Type[] types)
Parameters Type Name Description Type[] types
The array of supported types by the service provider.
Returns | Edit this page View Source CreateDelegatingFactory<T>()Creates factory that can be used to construct delegating service provider.
Declarationpublic static Func<T, IServiceProvider, IServiceProvider> CreateDelegatingFactory<T>() where T : notnull
Returns Type Parameters Name Description T
The type of the service that can be returned by the provider.
| Edit this page View Source CreateDelegatingFactory<T1, T2>()Creates factory that can be used to construct delegating service provider.
Declarationpublic static Func<T1, T2, IServiceProvider, IServiceProvider> CreateDelegatingFactory<T1, T2>() where T1 : notnull where T2 : notnull
Returns Type Parameters Name Description T1
The type of the first service that can be returned by the provider.
T2The type of the second service that can be returned by the provider.
| Edit this page View Source CreateDelegatingFactory<T1, T2, T3>()Creates factory that can be used to construct delegating service provider.
Declarationpublic static Func<T1, T2, T3, IServiceProvider, IServiceProvider> CreateDelegatingFactory<T1, T2, T3>() where T1 : notnull where T2 : notnull where T3 : notnull
Returns Type Parameters Name Description T1
The type of the first service that can be returned by the provider.
T2The type of the second service that can be returned by the provider.
T3The type of the third service that can be returned by the provider.
| Edit this page View Source CreateDelegatingFactory<T1, T2, T3, T4>()Creates factory that can be used to construct delegating service provider.
Declarationpublic static Func<T1, T2, T3, T4, IServiceProvider, IServiceProvider> CreateDelegatingFactory<T1, T2, T3, T4>() where T1 : notnull where T2 : notnull where T3 : notnull where T4 : notnull
Returns Type Parameters Name Description T1
The type of the first service that can be returned by the provider.
T2The type of the second service that can be returned by the provider.
T3The type of the third service that can be returned by the provider.
T4The type of the fourth service that can be returned by the provider.
| Edit this page View Source CreateDelegatingFactory<T1, T2, T3, T4, T5>()Creates factory that can be used to construct delegating service provider.
Declarationpublic static Func<T1, T2, T3, T4, T5, IServiceProvider, IServiceProvider> CreateDelegatingFactory<T1, T2, T3, T4, T5>() where T1 : notnull where T2 : notnull where T3 : notnull where T4 : notnull where T5 : notnull
Returns Type Parameters Name Description T1
The type of the first service that can be returned by the provider.
T2The type of the second service that can be returned by the provider.
T3The type of the third service that can be returned by the provider.
T4The type of the fourth service that can be returned by the provider.
T5The type of the fifth service that can be returned by the provider.
| Edit this page View Source CreateFactory(params Type[])Creates factory that can be used to construct the service provider.
Declarationpublic static Func<object[], IServiceProvider> CreateFactory(params Type[] types)
Parameters Type Name Description Type[] types
The array of supported types by the service provider.
Returns | Edit this page View Source CreateFactory<T>()Creates factory that can be used to construct the service provider.
Declarationpublic static Func<T, IServiceProvider> CreateFactory<T>() where T : notnull
Returns Type Description Func<T, IServiceProvider>
The factory that can be used to construct the service provider.
Type Parameters Name Description TThe type of the service that can be returned by the provider.
| Edit this page View Source CreateFactory<T1, T2>()Creates factory that can be used to construct the service provider.
Declarationpublic static Func<T1, T2, IServiceProvider> CreateFactory<T1, T2>() where T1 : notnull where T2 : notnull
Returns Type Description Func<T1, T2, IServiceProvider>
The factory that can be used to construct the service provider.
Type Parameters Name Description T1The type of the first service that can be returned by the provider.
T2The type of the second service that can be returned by the provider.
| Edit this page View Source CreateFactory<T1, T2, T3>()Creates factory that can be used to construct the service provider.
Declarationpublic static Func<T1, T2, T3, IServiceProvider> CreateFactory<T1, T2, T3>() where T1 : notnull where T2 : notnull where T3 : notnull
Returns Type Description Func<T1, T2, T3, IServiceProvider>
The factory that can be used to construct the service provider.
Type Parameters Name Description T1The type of the first service that can be returned by the provider.
T2The type of the second service that can be returned by the provider.
T3The type of the third service that can be returned by the provider.
| Edit this page View Source CreateFactory<T1, T2, T3, T4>()Creates factory that can be used to construct the service provider.
Declarationpublic static Func<T1, T2, T3, T4, IServiceProvider> CreateFactory<T1, T2, T3, T4>() where T1 : notnull where T2 : notnull where T3 : notnull where T4 : notnull
Returns Type Description Func<T1, T2, T3, T4, IServiceProvider>
The factory that can be used to construct the service provider.
Type Parameters Name Description T1The type of the first service that can be returned by the provider.
T2The type of the second service that can be returned by the provider.
T3The type of the third service that can be returned by the provider.
T4The type of the fourth service that can be returned by the provider.
| Edit this page View Source CreateFactory<T1, T2, T3, T4, T5>()Creates factory that can be used to construct the service provider.
Declarationpublic static Func<T1, T2, T3, T4, T5, IServiceProvider> CreateFactory<T1, T2, T3, T4, T5>() where T1 : notnull where T2 : notnull where T3 : notnull where T4 : notnull where T5 : notnull
Returns Type Description Func<T1, T2, T3, T4, T5, IServiceProvider>
The factory that can be used to construct the service provider.
Type Parameters Name Description T1The type of the first service that can be returned by the provider.
T2The type of the second service that can be returned by the provider.
T3The type of the third service that can be returned by the provider.
T4The type of the fourth service that can be returned by the provider.
T5The type of the fifth service that can be returned by the provider.
| Edit this page View Source Create<T>(T, IServiceProvider?)Creates service provider containing the single service.
Declarationpublic static IServiceProvider Create<T>(T service, IServiceProvider? fallback = null) where T : notnull
Parameters Type Name Description T service
The service instance.
IServiceProvider fallbackThe fallback provider used for service resolution if requested service type is not supported by the constructed provider.
Returns Type Parameters Name Description TThe type of the service.
| Edit this page View Source Create<T1, T2>(T1, T2, IServiceProvider?)Creates service provider containing the two services.
Declarationpublic static IServiceProvider Create<T1, T2>(T1 service1, T2 service2, IServiceProvider? fallback = null) where T1 : notnull where T2 : notnull
Parameters Type Name Description T1 service1
The first service.
T2 service2The second service.
IServiceProvider fallbackThe fallback provider used for service resolution if requested service type is not supported by the constructed provider.
Returns Type Parameters Name Description T1The type of the first service.
T2The type of the second service.
| Edit this page View Source Create<T1, T2, T3>(T1, T2, T3, IServiceProvider?)Creates service provider containing the three services.
Declarationpublic static IServiceProvider Create<T1, T2, T3>(T1 service1, T2 service2, T3 service3, IServiceProvider? fallback = null) where T1 : notnull where T2 : notnull where T3 : notnull
Parameters Type Name Description T1 service1
The first service.
T2 service2The second service.
T3 service3The third service.
IServiceProvider fallbackThe fallback provider used for service resolution if requested service type is not supported by the constructed provider.
Returns Type Parameters Name Description T1The type of the first service.
T2The type of the second service.
T3The type of the third service.
| Edit this page View Source Create<T1, T2, T3, T4>(T1, T2, T3, T4, IServiceProvider?)Creates service provider containing the four services.
Declarationpublic static IServiceProvider Create<T1, T2, T3, T4>(T1 service1, T2 service2, T3 service3, T4 service4, IServiceProvider? fallback = null) where T1 : notnull where T2 : notnull where T3 : notnull where T4 : notnull
Parameters Type Name Description T1 service1
The first service.
T2 service2The second service.
T3 service3The third service.
T4 service4The fourth service.
IServiceProvider fallbackThe fallback provider used for service resolution if requested service type is not supported by the constructed provider.
Returns Type Parameters Name Description T1The type of the first service.
T2The type of the second service.
T3The type of the third service.
T4The type of the fourth service.
| Edit this page View Source Create<T1, T2, T3, T4, T5>(T1, T2, T3, T4, T5, IServiceProvider?)Creates service provider containing the four services.
Declarationpublic static IServiceProvider Create<T1, T2, T3, T4, T5>(T1 service1, T2 service2, T3 service3, T4 service4, T5 service5, IServiceProvider? fallback = null) where T1 : notnull where T2 : notnull where T3 : notnull where T4 : notnull where T5 : notnull
Parameters Type Name Description T1 service1
The first service.
T2 service2The second service.
T3 service3The third service.
T4 service4The fourth service.
T5 service5The fifth service.
IServiceProvider fallbackThe fallback provider used for service resolution if requested service type is not supported by the constructed provider.
Returns Type Parameters Name Description T1The type of the first service.
T2The type of the second service.
T3The type of the third service.
T4The type of the fourth service.
T5The type of the fifth service.
| Edit this page View Source FromTuple<T>(T, IServiceProvider?)Creates service provider from the tuple.
Declarationpublic static IServiceProvider FromTuple<T>(T tuple, IServiceProvider? fallback = null) where T : struct, ITuple
Parameters Type Name Description T tuple
The tuple containing services.
IServiceProvider fallbackThe fallback provider used for service resolution if tuple doesn't contain the requested service.
Returns Type Description IServiceProviderThe service provider constructed from the tuple.
Type Parameters Name Description TThe tuple type representing a set of services.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4