Context<TActivity>.SendAsync 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
| Name | Description |
|---|---|
| SendAsync(MessageActivityInput, CancellationToken) |
Sends an activity to the conversation. When the activity carries a recipient marked as targeted
(a recipient with |
| SendAsync(String, CancellationToken) |
Sends a message activity as a reply. |
SendAsync(MessageActivityInput, CancellationToken)
Sends an activity to the conversation. When the activity carries a recipient marked as targeted
(a recipient with IsTargeted set), the message is sent as a
targeted message visible only to that recipient.
public System.Threading.Tasks.Task<Microsoft.Teams.Core.SendActivityResponse?> SendAsync(Microsoft.Teams.Apps.MessageActivityInput activity, System.Threading.CancellationToken cancellationToken = default);
member this.SendAsync : Microsoft.Teams.Apps.MessageActivityInput * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Teams.Core.SendActivityResponse>
Public Function SendAsync (activity As MessageActivityInput, Optional cancellationToken As CancellationToken = Nothing) As Task(Of SendActivityResponse)
Parameters
- activity
- MessageActivityInput
The activity to send.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
The response from the send operation.
Applies to
SendAsync(String, CancellationToken)
Sends a message activity as a reply.
public System.Threading.Tasks.Task<Microsoft.Teams.Core.SendActivityResponse?> SendAsync(string text, System.Threading.CancellationToken cancellationToken = default);
member this.SendAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Teams.Core.SendActivityResponse>
Public Function SendAsync (text As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of SendActivityResponse)
Parameters
- text
- String
The text to send.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
The response from the send operation.