Send a text message in the conversation.

Namespace:  Microsoft.Rtc.Collaboration
Assembly:  Microsoft.Rtc.Collaboration(in Microsoft.Rtc.Collaboration.dll)

Syntax

Visual Basic (Declaration)
Public 
Function 
BeginSendMessage ( _
	
textBody 
As 
String, _
	
userCallback 
As 
AsyncCallback, _
	
state 
As 
Object _
) 
As 
IAsyncResult
C#
public 
IAsyncResult 
BeginSendMessage(
	
string 
textBody,
	
AsyncCallback 
userCallback,
	
Object 
state
)
Visual C++
public:
IAsyncResult^ 
BeginSendMessage(
	
String^ 
textBody, 
	
AsyncCallback^ 
userCallback, 
	
Object^ 
state
)
JavaScript
function 
beginSendMessage(
textBody, 
userCallback, 
state);

Parameters

textBody
Type: String
Text body.
userCallback
Type: AsyncCallback
The method to be called when the asynchronous operation is completed.
state
Type: Object
A user-provided object that distinguishes this particular asynchronous operation from other asynchronous operations.

Return Value

An IAsyncResult that references the asynchronous operation.

Remarks

It is delivered to all remote participants currently capable of receiving instant messages.

Exceptions

Exception Condition
ArgumentNullException Thrown when null is passed for a required parameter. The parameter name that is required is included in the exception message.
InvalidOperationException Thrown when the provider is in the wrong state to send a message.
Microsoft.Rtc.Signaling . . :: . ServerPolicyException Thrown when a server policy setting does not allow the sending of the message.

See Also