ServiceCollectionExtensions.AddAgentApplicationOptions 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
| Name | Description |
|---|---|
| AddAgentApplicationOptions(IHostApplicationBuilder, AutoSignInSelector) |
Registers AgentApplicationOptions for AgentApplication-based Agents. |
| AddAgentApplicationOptions(IServiceCollection, AutoSignInSelector, Boolean) |
Adds the required agent application options and, optionally, an auto sign-in selector to the service collection. |
AddAgentApplicationOptions(IHostApplicationBuilder, AutoSignInSelector)
Registers AgentApplicationOptions for AgentApplication-based Agents.
public static Microsoft.Extensions.Hosting.IHostApplicationBuilder AddAgentApplicationOptions(this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder, Microsoft.Agents.Builder.App.UserAuth.AutoSignInSelector autoSignIn = default);
static member AddAgentApplicationOptions : Microsoft.Extensions.Hosting.IHostApplicationBuilder * Microsoft.Agents.Builder.App.UserAuth.AutoSignInSelector -> Microsoft.Extensions.Hosting.IHostApplicationBuilder
<Extension()>
Public Function AddAgentApplicationOptions (builder As IHostApplicationBuilder, Optional autoSignIn As AutoSignInSelector = Nothing) As IHostApplicationBuilder
Parameters
- builder
- IHostApplicationBuilder
- autoSignIn
- AutoSignInSelector
Returns
The same instance of IHostApplicationBuilder to allow for method chaining.
Remarks
This loads options from IConfiguration and DI. The AgentApplicationOptions is added as a singleton.
Applies to
AddAgentApplicationOptions(IServiceCollection, AutoSignInSelector, Boolean)
Adds the required agent application options and, optionally, an auto sign-in selector to the service collection.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAgentApplicationOptions(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Agents.Builder.App.UserAuth.AutoSignInSelector autoSignIn = default, bool replaceExisting = true);
static member AddAgentApplicationOptions : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Agents.Builder.App.UserAuth.AutoSignInSelector * bool -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAgentApplicationOptions (services As IServiceCollection, Optional autoSignIn As AutoSignInSelector = Nothing, Optional replaceExisting As Boolean = true) As IServiceCollection
Parameters
- services
- IServiceCollection
The service collection to which the agent application options and auto sign-in selector are added.
- autoSignIn
- AutoSignInSelector
An optional delegate used to select the auto sign-in behavior. If provided, it is registered as a singleton service.
- replaceExisting
- Boolean
If true, replaces existing registrations of the agent application options and auto sign-in selector.