LocalOwnerPresence.BeginPublishPresence Method (ICollection<PresenceCategory>, AsyncCallback, Object)

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

'Declaration
Public Function BeginPublishPresence ( _
    categoryItems As ICollection(Of PresenceCategory), _
    userCallback As AsyncCallback, _
    state As Object _
) As IAsyncResult
'Usage
Dim instance As LocalOwnerPresence
Dim categoryItems As ICollection(Of PresenceCategory)
Dim userCallback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult

returnValue = instance.BeginPublishPresence(categoryItems, _
    userCallback, state)
public IAsyncResult BeginPublishPresence(
    ICollection<PresenceCategory> categoryItems,
    AsyncCallback userCallback,
    Object state
)

Parameters

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

Return Value

Type: System.IAsyncResult
An IAsyncResult that references the asynchronous operation.

Exceptions

Exception Condition
InvalidOperationException

Thrown when the endpoint is not in the "registered" state, or the current state of LocalOwnerPresence is not "subscribed" or atleast one of the categories to be published is unknown.

ArgumentNullException

Thrown when categoryItems passed is null.

ArgumentException

Thrown when categoryItems contains a null CategoryItem or a custom category with invalid xml or transformation.

Remarks

Only UserEndpoints can use this API which uses a grammar provided by UCMA to publish. ApplicationEndpoints have to explicitly specify the container ID and instance ID for their publication.

UserEndpoints must already have subscribed to LocalOwnerPresence session before they can use this Api.

See Also

Reference

LocalOwnerPresence Class

LocalOwnerPresence Members

BeginPublishPresence Overload

Microsoft.Rtc.Collaboration.Presence Namespace