Begins an asynchronous operation to publish a given list of categories.

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

Syntax

Visual Basic (Declaration)
Public 
Function 
BeginPublishPresence ( _
	
categories 
As 
ICollection(
Of 

PresenceCategoryWithMetaData), _
	
userCallback 
As 
AsyncCallback, _
	
state 
As 
Object _
) 
As 
IAsyncResult
C#
public 
IAsyncResult 
BeginPublishPresence(
	
ICollection<

PresenceCategoryWithMetaData> 
categories,
	
AsyncCallback 
userCallback,
	
Object 
state
)
Visual C++
public:
IAsyncResult^ 
BeginPublishPresence(
	
ICollection<

PresenceCategoryWithMetaData^>^ 
categories, 
	
AsyncCallback^ 
userCallback, 
	
Object^ 
state
)
JavaScript
function 
beginPublishPresence(
categories, 
userCallback, 
state);

Parameters

categories
Type: ICollection < (Of < ( PresenceCategoryWithMetaData > ) > )
The list of categories to be published.
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

If a version conflict error occurred in publishing categories, it will automatically retried with updated version number.

Deleting a publication involves publishing the PresenceCategoryWithMetaDataobject again with the ExpiryPolicyset to Timeand Expiresset to the value zero.

Exceptions

Exception Condition
InvalidOperationException Thrown when the endpoint is not in the "registered" state.
ArgumentNullException Thrown when categoriesis null.
ArgumentException Thrown when categoriescontains a null CategoryItem.

See Also