Export (0) Print
Expand All

PeerCollaboration.SignOut Method

Signs the peer out of the specified scope.

Namespace:  System.Net.PeerToPeer.Collaboration
Assembly:  System.Net (in System.Net.dll)

public static void SignOut(
	PeerScope peerScope
)

Parameters

peerScope
Type: System.Net.PeerToPeer.Collaboration.PeerScope

Scope enumeration specified by PeerScope.

ExceptionCondition
ArgumentOutOfRangeException

The peerScope parameter contains an invalid enumeration value.

PeerToPeerException

The SignOut operation could not be completed.

This method is not an application-specific operation and signing out may affect other applications that may be currently running. If the user is not already signed into the specified scope calling this method results in a no-op.

When a user signs out of People Near Me, their published information is deleted from the PeerCollaboration endpoint object set. This includes LocalEndPointName and LocalPresenceInfo, in addition to any identifying objects registered by the calling peer into the collaboration infrastructure. Because this information is deleted, it is no longer available to either remote peers or a peer host for collaboration. From the perspective of the PeerCollaboration class, other sharing of the same information with trusted contacts is not relevant; use of the PeerCollaboration class does not affect other objects in which this information was persisted, such as a remote peer ContactManager object. Likewise, deleting a peer from the ContactManager does not affect its presence in a collaboration application; other contacts are still able to view its presence and collaborate with it.

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

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft