Redigeeri

Jagamisviis:


PeerContact.SubscribeAsync(Object) Method

Definition

Asynchronously subscribes the calling peer to the PeerContact, and as a result, the peer will receive any future PeerCollaboration events associated with the PeerContact.

public:
 virtual void SubscribeAsync(System::Object ^ userToken);
public virtual void SubscribeAsync (object userToken);
abstract member SubscribeAsync : obj -> unit
override this.SubscribeAsync : obj -> unit
Public Overridable Sub SubscribeAsync (userToken As Object)

Parameters

userToken
Object

A user-defined Object that contains information about the SubscribeAsync(Object) operation.

Exceptions

UserToken cannot be null.

The calling peer is not signed in to People Near Me.

The PeerContact object has been disposed.

Remarks

The SubscribeCompleted event is raised upon completion of this operation. If collaboration activities are not required to be asynchronous, the Subscribe method should be used instead.

Calling this method requires a PermissionState of Unrestricted. This state is created when the peer collaboration session begins.

Applies to

See also