ChatThreadClient.SendMessageAsync 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
SendMessageAsync(SendChatMessageOptions, CancellationToken) |
Sends a message to a thread asynchronously. |
SendMessageAsync(String, ChatMessageType, String, CancellationToken) |
Sends a message to a thread asynchronously. |
SendMessageAsync(SendChatMessageOptions, CancellationToken)
- Source:
- ChatThreadClient.cs
- Source:
- ChatThreadClient.cs
Sends a message to a thread asynchronously.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Chat.SendChatMessageResult>> SendMessageAsync (Azure.Communication.Chat.SendChatMessageOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member SendMessageAsync : Azure.Communication.Chat.SendChatMessageOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Chat.SendChatMessageResult>>
override this.SendMessageAsync : Azure.Communication.Chat.SendChatMessageOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Chat.SendChatMessageResult>>
Public Overridable Function SendMessageAsync (options As SendChatMessageOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of SendChatMessageResult))
Parameters
- options
- SendChatMessageOptions
Options for the message.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
The server returned an error. See Message for details returned from the server.
Applies to
SendMessageAsync(String, ChatMessageType, String, CancellationToken)
- Source:
- ChatThreadClient.cs
- Source:
- ChatThreadClient.cs
Sends a message to a thread asynchronously.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Chat.SendChatMessageResult>> SendMessageAsync (string content, Azure.Communication.Chat.ChatMessageType type = default, string senderDisplayName = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SendMessageAsync : string * Azure.Communication.Chat.ChatMessageType * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Chat.SendChatMessageResult>>
override this.SendMessageAsync : string * Azure.Communication.Chat.ChatMessageType * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Chat.SendChatMessageResult>>
Public Overridable Function SendMessageAsync (content As String, Optional type As ChatMessageType = Nothing, Optional senderDisplayName As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of SendChatMessageResult))
Parameters
- content
- String
Chat message content.
- type
- ChatMessageType
The chat message type.
- senderDisplayName
- String
The display name of the chat message sender. This property is used to populate sender name for push notifications.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
The server returned an error. See Message for details returned from the server.
Applies to
Azure SDK for .NET