ServiceCollectionExtensions
public static class ServiceCollectionExtensions
Namespace: RhoMicro.BindSight
Inheritance:
DirectoryServiceCollectionExtensions
Summary
Section titled “Summary”Provides extension methods for IServiceCollection.
Methods
Section titled “Methods”AddBindSight(IServiceCollection)
Section titled “AddBindSight(IServiceCollection)”public static BindSightBuilder AddBindSight(this IServiceCollection services)
Summary
Section titled “Summary”Adds options docs services to the service collection.
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
services | IServiceCollection | The service collection to add options docs services to. |
Returns
Section titled “Returns”A builder for configuring options docs services.
AddDocumentedOptions<TOptions>(IServiceCollection, string, Action<BinderOptions>)
Section titled “AddDocumentedOptions<TOptions>(IServiceCollection, string, Action<BinderOptions>)”public static OptionsBuilder<TOptions> AddDocumentedOptions<TOptions>(this IServiceCollection services, string configSectionPath, [Action<BinderOptions>? configureBinder = null]) where TOptions : class
Summary
Section titled “Summary”Gets an options builder that forwards Configure calls for the same TOptions to the underlying service collection. Documentation services for the options are registered as well.
Type Parameters
Section titled “Type Parameters”Name | Description | Constraints |
---|---|---|
TOptions | The options type to be configured. | class |
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
configSectionPath | String | The name of the configuration section to bind from. |
configureBinder | Action<BinderOptions> | Optional. Used to configure the BinderOptions. |
services | IServiceCollection | The IServiceCollection to add the services to. |
Returns
Section titled “Returns”The OptionsBuilder<TOptions> so that configure calls can be chained in it.
AddDocumentedOptions<TOptions>(IServiceCollection, string, string, Action<BinderOptions>)
Section titled “AddDocumentedOptions<TOptions>(IServiceCollection, string, string, Action<BinderOptions>)”public static OptionsBuilder<TOptions> AddDocumentedOptions<TOptions>(this IServiceCollection services, string name, string configSectionPath, [Action<BinderOptions>? configureBinder = null]) where TOptions : class
Summary
Section titled “Summary”Gets an options builder that forwards Configure calls for the same TOptions to the underlying service collection. Documentation services for the options are registered as well.
Type Parameters
Section titled “Type Parameters”Name | Description | Constraints |
---|---|---|
TOptions | The options type to be configured. | class |
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
configSectionPath | String | The name of the configuration section to bind from. |
configureBinder | Action<BinderOptions> | Optional. Used to configure the BinderOptions. |
name | String | The name of the options instance. |
services | IServiceCollection | The IServiceCollection to add the services to. |
Returns
Section titled “Returns”The OptionsBuilder<TOptions> so that configure calls can be chained in it.