OptionsServiceCollectionExtensions.ConfigureOptions 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
ConfigureOptions(IServiceCollection, Object) |
Registers an object that will have all of its |
ConfigureOptions(IServiceCollection, Type) |
Registers a type that will have all of its |
ConfigureOptions<TConfigureOptions>(IServiceCollection) |
Registers a type that will have all of its |
ConfigureOptions(IServiceCollection, Object)
Registers an object that will have all of its I[Post]ConfigureOptions
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)
Registers a type that will have all of its I[Post]ConfigureOptions
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)
Registers a type that will have all of its I[Post]ConfigureOptions
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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기