Aracılığıyla paylaş


OptionsServiceCollectionExtensions.ConfigureOptions Method

Definition

Overloads

ConfigureOptions(IServiceCollection, Object)

Registers an object that will have all of its IConfigureOptions<TOptions>, IPostConfigureOptions<TOptions>, and IValidateOptions<TOptions> registered.

ConfigureOptions(IServiceCollection, Type)

Registers a type that will have all of its IConfigureOptions<TOptions>, IPostConfigureOptions<TOptions>, and IValidateOptions<TOptions> registered.

ConfigureOptions<TConfigureOptions>(IServiceCollection)

Registers a type that will have all of its IConfigureOptions<TOptions>, IPostConfigureOptions<TOptions>, and IValidateOptions<TOptions> registered.

ConfigureOptions(IServiceCollection, Object)

Source:
OptionsServiceCollectionExtensions.cs
Source:
OptionsServiceCollectionExtensions.cs

Registers an object that will have all of its IConfigureOptions<TOptions>, IPostConfigureOptions<TOptions>, and IValidateOptions<TOptions> registered.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ ConfigureOptions(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::Object ^ configureInstance);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigureOptions (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, object configureInstance);
static member ConfigureOptions : Microsoft.Extensions.DependencyInjection.IServiceCollection * obj -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function ConfigureOptions (services As IServiceCollection, configureInstance As Object) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection to add the services to.

configureInstance
Object

The instance that will configure options.

Returns

The IServiceCollection so that additional calls can be chained.

Applies to

ConfigureOptions(IServiceCollection, Type)

Source:
OptionsServiceCollectionExtensions.cs
Source:
OptionsServiceCollectionExtensions.cs

Registers a type that will have all of its IConfigureOptions<TOptions>, IPostConfigureOptions<TOptions>, and IValidateOptions<TOptions> registered.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ ConfigureOptions(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Type ^ configureType);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigureOptions (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Type configureType);
static member ConfigureOptions : Microsoft.Extensions.DependencyInjection.IServiceCollection * Type -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function ConfigureOptions (services As IServiceCollection, configureType As Type) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection to add the services to.

configureType
Type

The type that will configure options.

Returns

The IServiceCollection so that additional calls can be chained.

Applies to

ConfigureOptions<TConfigureOptions>(IServiceCollection)

Source:
OptionsServiceCollectionExtensions.cs
Source:
OptionsServiceCollectionExtensions.cs

Registers a type that will have all of its IConfigureOptions<TOptions>, IPostConfigureOptions<TOptions>, and IValidateOptions<TOptions> registered.

public:
generic <typename TConfigureOptions>
 where TConfigureOptions : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ ConfigureOptions(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigureOptions<TConfigureOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TConfigureOptions : class;
static member ConfigureOptions : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'ConfigureOptions : null)
<Extension()>
Public Function ConfigureOptions(Of TConfigureOptions As Class) (services As IServiceCollection) As IServiceCollection

Type Parameters

TConfigureOptions

The type that will configure options.

Parameters

services
IServiceCollection

The IServiceCollection to add the services to.

Returns

The IServiceCollection so that additional calls can be chained.

Applies to