HostBuilder.UseServiceProviderFactory Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
UseServiceProviderFactory<TContainerBuilder>(IServiceProviderFactory<TContainerBuilder>) |
Overrides the factory used to create the service provider. |
UseServiceProviderFactory<TContainerBuilder>(Func<HostBuilderContext,IServiceProviderFactory<TContainerBuilder>>) |
Overrides the factory used to create the service provider. |
UseServiceProviderFactory<TContainerBuilder>(IServiceProviderFactory<TContainerBuilder>)
- Source:
- HostBuilder.cs
- Source:
- HostBuilder.cs
- Source:
- HostBuilder.cs
- Source:
- HostBuilder.cs
- Source:
- HostBuilder.cs
Overrides the factory used to create the service provider.
public:
generic <typename TContainerBuilder>
virtual Microsoft::Extensions::Hosting::IHostBuilder ^ UseServiceProviderFactory(Microsoft::Extensions::DependencyInjection::IServiceProviderFactory<TContainerBuilder> ^ factory);
public Microsoft.Extensions.Hosting.IHostBuilder UseServiceProviderFactory<TContainerBuilder> (Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<TContainerBuilder> factory);
abstract member UseServiceProviderFactory : Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<'ContainerBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
override this.UseServiceProviderFactory : Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<'ContainerBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
Public Function UseServiceProviderFactory(Of TContainerBuilder) (factory As IServiceProviderFactory(Of TContainerBuilder)) As IHostBuilder
Type Parameters
- TContainerBuilder
The type of the builder to create.
Parameters
A factory used for creating service providers.
Returns
The same instance of the IHostBuilder for chaining.
Implements
Applies to
UseServiceProviderFactory<TContainerBuilder>(Func<HostBuilderContext,IServiceProviderFactory<TContainerBuilder>>)
- Source:
- HostBuilder.cs
- Source:
- HostBuilder.cs
- Source:
- HostBuilder.cs
- Source:
- HostBuilder.cs
- Source:
- HostBuilder.cs
Overrides the factory used to create the service provider.
public:
generic <typename TContainerBuilder>
virtual Microsoft::Extensions::Hosting::IHostBuilder ^ UseServiceProviderFactory(Func<Microsoft::Extensions::Hosting::HostBuilderContext ^, Microsoft::Extensions::DependencyInjection::IServiceProviderFactory<TContainerBuilder> ^> ^ factory);
public Microsoft.Extensions.Hosting.IHostBuilder UseServiceProviderFactory<TContainerBuilder> (Func<Microsoft.Extensions.Hosting.HostBuilderContext,Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<TContainerBuilder>> factory);
abstract member UseServiceProviderFactory : Func<Microsoft.Extensions.Hosting.HostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<'ContainerBuilder>> -> Microsoft.Extensions.Hosting.IHostBuilder
override this.UseServiceProviderFactory : Func<Microsoft.Extensions.Hosting.HostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<'ContainerBuilder>> -> Microsoft.Extensions.Hosting.IHostBuilder
Public Function UseServiceProviderFactory(Of TContainerBuilder) (factory As Func(Of HostBuilderContext, IServiceProviderFactory(Of TContainerBuilder))) As IHostBuilder
Type Parameters
- TContainerBuilder
The type of the builder to create.
Parameters
- factory
- Func<HostBuilderContext,IServiceProviderFactory<TContainerBuilder>>
A factory used for creating service providers.
Returns
The same instance of the IHostBuilder for chaining.