TeamsTurnContext 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.
public class TeamsTurnContext : Microsoft.Agents.Builder.TurnContextWrapper, Microsoft.Agents.Extensions.MSTeams.ITeamsTurnContext
type TeamsTurnContext = class
inherit TurnContextWrapper
interface ITeamsTurnContext
interface ITurnContext
Public Class TeamsTurnContext
Inherits TurnContextWrapper
Implements ITeamsTurnContext
- Inheritance
- Implements
Constructors
| Name | Description |
|---|---|
| TeamsTurnContext(ITurnContext) | |
Fields
| Name | Description |
|---|---|
| _turnContext | (Inherited from TurnContextWrapper) |
Properties
| Name | Description |
|---|---|
| Activity |
Gets the current ITeamsActivity, exposing the Activity as a strongly-typed ITeamsActivity instead of IActivity. |
| Adapter |
Gets the Adapter that created this context object. (Inherited from TurnContextWrapper) |
| Client |
Returns the ApiClient instance registered for Microsoft Teams 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) |
| GetAppGraphClient(String) |
Creates a Microsoft.Graph.GraphServiceClient authenticated with an app-only (application) token, using the token connection resolved for the current turn. |
| GetAppGraphClientForConnection(String, String) |
Creates a Microsoft.Graph.GraphServiceClient authenticated with an app-only (application) token, using the named token connection. |
| GetGraphClient(String, String) |
Creates a Microsoft.Graph.GraphServiceClient authenticated with a delegated (user) token for the signed-in user of the current turn. |
| 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) |
| SendTargetedActivitiesAsync(IActivity[], CancellationToken) |
Sends a set of activities to targeted recipients within the current turn context asynchronously. |
| SendTargetedActivityAsync(IActivity, CancellationToken) |
Sends an activity to the conversation with a targeted treatment, allowing the activity to be directed to a specific recipient or group within the conversation. |
| 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) | |