Send a message in the conversation.

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

Syntax

Visual Basic (Declaration)
Public 
Function 
BeginSendMessage ( _
	
contentType 
As 
ContentType, _
	
body 
As 
Byte(), _
	
userCallback 
As 
AsyncCallback, _
	
state 
As 
Object _
) 
As 
IAsyncResult
C#
public 
IAsyncResult 
BeginSendMessage(
	
ContentType 
contentType,
	
byte[] 
body,
	
AsyncCallback 
userCallback,
	
Object 
state
)
Visual C++
public:
IAsyncResult^ 
BeginSendMessage(
	
ContentType^ 
contentType, 
	
array<
unsigned char>^ 
body, 
	
AsyncCallback^ 
userCallback, 
	
Object^ 
state
)
JavaScript
function 
beginSendMessage(
contentType, 
body, 
userCallback, 
state);

Parameters

contentType
Type: ContentType
The content type.
body
Type: array< Byte > [] () []
The message 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 currenly 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