AgentApplication.OnBeforeTurn(TurnEventHandler) 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.
Add a handler that will execute before the turn's activity handler logic is processed.
Handler returns true to continue execution of the current turn. Handler returning false
prevents the turn from running, but the Agents state is still saved, which lets you
track the reason why the turn was not processed. It also means you can use this as
a way to call into the dialog system. For example, you could use the OAuthPrompt to sign the
user in before allowing the AI system to run.
public Microsoft.Agents.Builder.App.AgentApplication OnBeforeTurn(Microsoft.Agents.Builder.App.TurnEventHandler handler);
member this.OnBeforeTurn : Microsoft.Agents.Builder.App.TurnEventHandler -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnBeforeTurn (handler As TurnEventHandler) As AgentApplication
Parameters
- handler
- TurnEventHandler
Function to call before turn execution.
Returns
The application instance for chaining purposes.