TeamsBotApplicationOptions.UseState(Action<TurnStateOptions>) 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.
Enables per-turn state management backed by IDistributedCache. An in-memory cache is used by default; register a custom IDistributedCache (Redis, SQL Server, etc.) to persist state across restarts.
public Microsoft.Teams.Apps.TeamsBotApplicationOptions UseState(Action<Microsoft.Teams.Apps.State.TurnStateOptions>? configure = default);
member this.UseState : Action<Microsoft.Teams.Apps.State.TurnStateOptions> -> Microsoft.Teams.Apps.TeamsBotApplicationOptions
Public Function UseState (Optional configure As Action(Of TurnStateOptions) = Nothing) As TeamsBotApplicationOptions
Parameters
- configure
- Action<TurnStateOptions>
Optional delegate to configure TurnStateOptions (e.g. cache entry TTL).
Returns
This instance for chaining.