SlackTurnContext Class
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.
A Slack-aware ITurnContext that exposes Slack-specific helpers such as the Slack API client and strongly-typed channel data on top of the underlying turn context.
public class SlackTurnContext : Microsoft.Agents.Builder.TurnContextWrapper, Microsoft.Agents.Builder.ITurnContext<Microsoft.Agents.Extensions.Slack.ISlackActivity>, Microsoft.Agents.Extensions.Slack.ISlackTurnContext
type SlackTurnContext = class
inherit TurnContextWrapper
interface ISlackTurnContext
interface ITurnContext
interface ITurnContext<ISlackActivity>
Public Class SlackTurnContext
Inherits TurnContextWrapper
Implements ISlackTurnContext, ITurnContext(Of ISlackActivity)
- Inheritance
- Implements
Remarks
Initializes a new instance of the SlackTurnContext class wrapping the specified inner turn context.
Constructors
| Name | Description |
|---|---|
| SlackTurnContext(ITurnContext) |
A Slack-aware ITurnContext that exposes Slack-specific helpers such as the Slack API client and strongly-typed channel data on top of the underlying turn context. |
Fields
| Name | Description |
|---|---|
| _turnContext | (Inherited from TurnContextWrapper) |
Properties
| Name | Description |
|---|---|
| Activity |
Gets the current ISlackActivity, exposing the Activity as a strongly-typed ISlackActivity instead of IActivity. |
| Adapter |
Gets the Adapter that created this context object. (Inherited from TurnContextWrapper) |
| Client |
Gets the SlackApi client registered for Slack API access in the current turn context. |
| Identity |
Gets the claims identity associated with this turn context. (Inherited from TurnContextWrapper) |
| Responded |
Gets a value indicating whether at least one response was sent for the current turn. (Inherited from TurnContextWrapper) |
| Services |
Gets the services registered on this context object. (Inherited from TurnContextWrapper) |
| StackState |
Gets the state collection for the turn context. (Inherited from TurnContextWrapper) |
| StreamingResponse |
Provides access to the IStreamingResponse to allow streaming of chunked messages (for example, via streaming AI responses). (Inherited from TurnContextWrapper) |
Methods
| Name | Description |
|---|---|
| DeleteActivityAsync(ConversationReference, CancellationToken) |
Deletes an existing activity. (Inherited from TurnContextWrapper) |
| DeleteActivityAsync(String, CancellationToken) |
Deletes an existing activity. (Inherited from TurnContextWrapper) |
| OnDeleteActivity(DeleteActivityHandler) |
Adds a response handler for delete activity operations. (Inherited from TurnContextWrapper) |
| OnSendActivities(SendActivitiesHandler) |
Adds a response handler for send activity operations. (Inherited from TurnContextWrapper) |
| OnUpdateActivity(UpdateActivityHandler) |
Adds a response handler for update activity operations. (Inherited from TurnContextWrapper) |
| SendActivitiesAsync(IActivity[], CancellationToken) |
Sends a set of activities to the sender of the incoming activity. (Inherited from TurnContextWrapper) |
| SendActivityAsync(IActivity, CancellationToken) |
Sends an activity to the sender of the incoming activity. (Inherited from TurnContextWrapper) |
| SendActivityAsync(String, String, String, CancellationToken) |
Sends a message activity to the sender of the incoming activity. (Inherited from TurnContextWrapper) |
| TraceActivityAsync(String, Object, String, String, CancellationToken) |
Sends a trace activity to the IChannelAdapter for logging purposes. (Inherited from TurnContextWrapper) |
| UpdateActivityAsync(IActivity, CancellationToken) |
Replaces an existing activity. (Inherited from TurnContextWrapper) |
Extension Methods
| Name | Description |
|---|---|
| ExchangeTurnTokenAsync(ITurnContext, String, String, IList<String>, CancellationToken) | |
| GetDebugger(ITurnContext) |
Extension method to get IDialogDebugger from TurnContext. |
| GetTurnTokenAsync(ITurnContext, String, CancellationToken) | |
| GetTurnTokens(ITurnContext) | |
| IsAgenticRequest(ITurnContext) | |