Class ServiceCollectionContainerBuilderExtensions
Extension methods for building a ServiceProvider from an IServiceCollection.
Inherited Members
Namespace: nanoFramework.DependencyInjection
Assembly: nanoFramework.DependencyInjection.dll
Syntax
public static class ServiceCollectionContainerBuilderExtensions
Methods
BuildServiceProvider(IServiceCollection)
Creates a ServiceProvider containing services from the provided IServiceCollection.
Declaration
public static ServiceProvider BuildServiceProvider(this IServiceCollection services)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The IServiceCollection containing service descriptors. |
Returns
Type | Description |
---|---|
ServiceProvider | The ServiceProvider. |
BuildServiceProvider(IServiceCollection, ServiceProviderOptions)
Creates a ServiceProvider containing services from the provided IServiceCollection optionally enabling scope validation.
Declaration
public static ServiceProvider BuildServiceProvider(this IServiceCollection services, ServiceProviderOptions options)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The IServiceCollection containing service descriptors. |
ServiceProviderOptions | options | Configures various service provider behaviors. |
Returns
Type | Description |
---|---|
ServiceProvider | The ServiceProvider. |