This documentation is archived and is not being maintained.

PeerCollaboration Class

Interacts with the Peer Collaboration infrastructure. Many of the core collaboration scenarios begin with this class.


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

public static class PeerCollaboration

The PeerCollaboration type exposes the following members.

Public propertyStatic memberApplicationLaunchInfoGets the PeerApplicationLaunchInfo object that contains information needed when an application is started due to a collaboration request from a remote peer.
Public propertyStatic memberContactManagerGets the persistent store that contains all PeerContact objects for remote peers.
Public propertyStatic memberLocalEndPointNameGets or sets the name of the PeerEndPoint associated with the calling peer.
Public propertyStatic memberLocalPresenceInfoGets or sets the presence for the calling peer within the PeerCollaboration infrastructure.
Public propertyStatic memberSignInScopeGets the PeerScope to which the calling peer can publish presence, capability and object information.
Public propertyStatic memberSynchronizingObjectGets or sets the event handler callback object for all event handlers.

Public methodStatic memberDeleteObjectDeregisters a PeerObject associated with the calling peer.
Public methodStatic memberGetLocalRegisteredApplications()Gets all PeerApplication objects that are registered on the local machine.
Public methodStatic memberGetLocalRegisteredApplications(PeerApplicationRegistrationType)Gets a collection of all PeerApplication objects that are registered on the local machine for the specified PeerApplicationRegistrationType.
Public methodStatic memberGetLocalSetObjectsObtains all PeerObject instances registered by the calling peer with the PeerCollaboration infrastructure on this machine.
Public methodStatic memberGetPeersNearMeReturns a collection of all the PeerCollaboration endpoints currently signed in on the network subnet of the calling peer.
Public methodStatic memberRegisterApplicationRegisters the specified PeerApplication for a collaboration session with the calling peer.
Public methodStatic memberSetObjectRegisters a PeerObject associated with the calling peer.
Public methodStatic memberSignInSigns the peer into the collaboration infrastructure with the specified PeerScope.
Public methodStatic memberSignOutSigns the peer out of the specified scope.
Public methodStatic memberUnregisterApplicationDeregisters the specified PeerApplication from the PeerCollaboration infrastructure.

Public eventStatic memberLocalApplicationChangedRaised when a PeerApplication in the PeerApplicationCollection for the local peer on the local host has changed.
Public eventStatic memberLocalNameChangedRaised when the name of the PeerEndPoint on the local host for the local peer has changed.
Public eventStatic memberLocalObjectChangedA PeerObject in the PeerObjectCollection for the local peer on the local host has changed.
Public eventStatic memberLocalPresenceChangedThe PeerPresenceInfo of the local peer on the local host has changed.

This class is a static class – it is sealed, abstract and does not have a public constructor. It is used to contain and manage application, object, and presence information for peers that have accepted invitations to a collaboration session. In terms of peers, objects, and applications, the PeerCollaboration class provides three accessors, one for each collection, as an interface or point of connectivity for whatever else is happening on the machine. This class cannot be inherited; a compile-time error will occur if this sealed class is specified as the base class.

Methods and properties in this class can be used to:

  • Launch and manage collaborative applications

  • Register and delete applications and collaboration objects (such as certificates, pictures, avatars, and text descriptions)

  • Invite peers to collaboration sessions, including items such as scope and objects which will identify them over the Internet

  • Allow peers to SignIn and SignOut of the collaboration infrastructure, manage lists of contacts, or publish their presence to each other

  • Utilize SynchronizingObject properties and events to coordinate asynchronous application communication, especially for changes in name, presence, application, or other objects.

"Link-local cloud", "subnet of the calling peer", and "NearMe scope" are synonymous terms. "Internet scope" and "serverless presence" are synonymous. The site-local PnrpScope has no equivalent in the collaboration namespace.

The use of every method or property in this class requires a PermissionState of Unrestricted. This state is created when the peer collaboration session begins.

.NET Framework

Supported in: 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.