This documentation is archived and is not being maintained.

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)

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

Parameters

targets
Type: System.Collections.Generic..::..IEnumerable<(Of <(<'String>)>)>
categories
Type: array<System..::..String>[]()[][]
queryResultHandler
Type: System..::..EventHandler<(Of <(<'RemotePresenceNotificationEventArgs>)>)>
userCallback
Type: System..::..AsyncCallback
state
Type: System..::..Object

Return Value

Type: System..::..IAsyncResult

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.

Show: