Share via


BeginPresenceQuery Method

Begin a presence query request for a given list of targets for the given set of presence categories.

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

Syntax

'Declaration
Public Function BeginPresenceQuery ( _
    targets As IEnumerable(Of String), _
    categories As String(), _
    queryResultHandler As EventHandler(Of RemotePresenceNotificationEventArgs), _
    userCallback As AsyncCallback, _
    state As Object _
) As IAsyncResult
'Usage
Dim instance As RemotePresence
Dim targets As IEnumerable(Of String)
Dim categories As String()
Dim queryResultHandler As EventHandler(Of RemotePresenceNotificationEventArgs)
Dim userCallback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult

returnValue = instance.BeginPresenceQuery(targets, _
    categories, queryResultHandler, _
    userCallback, state)
public IAsyncResult BeginPresenceQuery(
    IEnumerable<string> targets,
    string[] categories,
    EventHandler<RemotePresenceNotificationEventArgs> queryResultHandler,
    AsyncCallback userCallback,
    Object state
)

Parameters

Return Value

Type: System..::..IAsyncResult

Remarks

Categories that be set are: "contactCard", "note", "state", "services" and "calendarData".

A presence query internally could involve multiple query requests to different single and pool targets. If user specified a query result handler then results will be notified on the given event handler as soon as they are available. Calling EndPresenceQuery will return the all results for query.

See Also

Reference

RemotePresence Class

RemotePresence Members

Microsoft.Rtc.Collaboration.Presence Namespace