TurnContext.DeleteActivityAsync 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
| DeleteActivityAsync(ConversationReference, CancellationToken) | Deletes an existing activity. | 
| DeleteActivityAsync(String, CancellationToken) | Deletes an existing activity. | 
DeleteActivityAsync(ConversationReference, CancellationToken)
Deletes an existing activity.
public System.Threading.Tasks.Task DeleteActivityAsync(Microsoft.Agents.Core.Models.ConversationReference conversationReference, System.Threading.CancellationToken cancellationToken = default);abstract member DeleteActivityAsync : Microsoft.Agents.Core.Models.ConversationReference * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.DeleteActivityAsync : Microsoft.Agents.Core.Models.ConversationReference * System.Threading.CancellationToken -> System.Threading.Tasks.TaskPublic Function DeleteActivityAsync (conversationReference As ConversationReference, Optional cancellationToken As CancellationToken = Nothing) As TaskParameters
- conversationReference
- ConversationReference
The conversation containing the activity to delete.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
The conversation reference's ActivityId indicates the activity in the conversation to delete.
Not all channels support this operation. For channels that don't, this call may throw an exception.
Implements
Applies to
DeleteActivityAsync(String, CancellationToken)
Deletes an existing activity.
public System.Threading.Tasks.Task DeleteActivityAsync(string activityId, System.Threading.CancellationToken cancellationToken = default);abstract member DeleteActivityAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.DeleteActivityAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.TaskPublic Function DeleteActivityAsync (activityId As String, Optional cancellationToken As CancellationToken = Nothing) As TaskParameters
- activityId
- String
The ID of the activity to delete.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.