Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

PeerContact Class

Represents a peer for which a user has retrieved extended information.

System.Object
  System.Net.PeerToPeer.Collaboration.Peer
    System.Net.PeerToPeer.Collaboration.PeerContact

Namespace:  System.Net.PeerToPeer.Collaboration
Assembly:  System.Net (in System.Net.dll)
[SerializableAttribute]
public class PeerContact : Peer, 
	IEquatable<PeerContact>, ISerializable

The PeerContact type exposes the following members.

  NameDescription
Protected methodPeerContactNo public constructor is defined for this class.
Top
  NameDescription
Public propertyCredentialsGets or sets the X509Certificate (public key) for the peer identified by this PeerContact instance.
Public propertyDisplayNameGets or sets a string which represents the display name of the PeerContact.
Public propertyEmailAddressGets or sets the email address associated with the PeerContact.
Public propertyIsOnlineGets a value specifying if the Peer is currently 'online'. (Inherited from Peer.)
Public propertyIsSubscribedGets or sets a value specifying whether the current PeerContact is subscribed or unsubscribed to an endpoint. Alternatively, this property gets or sets a value specifying whether the current peer host or hosting application has subscribed or unsubscribed to this PeerContact.
Public propertyNicknameGets or sets a string which represents the Nickname of the PeerContact.
Public propertyPeerEndPointsGets the PeerEndPointCollection associated with this PeerContact. (Overrides Peer.PeerEndPoints.)
Public propertyPeerNameGets or sets the PeerName associated with the PeerContact.
Public propertySubscribeAllowedGets or sets a value that specifies whether the PeerContact is exposed to the collaboration events associated with the peer or application that has ownership of the ContactManager in which this PeerContact object resides.
Public propertySynchronizingObjectWhen this property value is set, all events not fired as the result of an asynchronous operation will have the associated event handlers called back on the thread that created the specific SynchronizingObject. (Inherited from Peer.)
Top
  NameDescription
Public methodDispose()Releases all resources used by the Peer object. (Inherited from Peer.)
Protected methodDispose(Boolean)Releases the unmanaged resources and optionally releases the managed resources used by the PeerApplication object. (Overrides Peer.Dispose(Boolean).)
Public methodEquals(Object)Compares the PeerContact instance to the specified object. (Overrides Object.Equals(Object).)
Public methodEquals(Peer)Performs a case-sensitive comparison of the current Peer and the specified peer. (Inherited from Peer.)
Public methodEquals(PeerContact)Compares the PeerContact to the specified PeerContact instance.
Public methodStatic memberEquals(Object, Object)Determines whether the specified PeerContact instances are considered equal.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodStatic memberFromXmlCreates a PeerContact instance based on provided XML data.
Public methodGetApplications()Retrieves the PeerApplication objects that were registered by the remote peer into the local cache.
Public methodGetApplications(Guid)Gets the collection of PeerApplication objects with the specified Guid from the local cache.
Public methodGetApplications(PeerEndPoint)Gets the PeerApplicationCollection associated with the specified PeerEndPoint.
Public methodGetApplications(PeerEndPoint, Guid)Gets the PeerApplicationCollection associated with the specified PeerEndPoint.
Public methodGetHashCodeReturns the hash code for a PeerContact instance. (Overrides Object.GetHashCode().)
Protected methodGetObjectDataPopulates a SerializationInfo object with the data needed to serialize the PeerContact. (Overrides Peer.GetObjectData(SerializationInfo, StreamingContext).)
Public methodGetObjects()Gets the collection of data objects from a local cache. (Inherited from Peer.)
Public methodGetObjects(Guid)Gets the Peer object associated with the supplied Guid from the PeerObjectCollection. (Inherited from Peer.)
Public methodGetObjects(PeerEndPoint)Gets the PeerObjectCollection registered by the specified PeerEndPoint and stored in the local cache.
Public methodGetObjects(PeerEndPoint, Guid)Gets the collection of peer objects registered by the specified PeerEndPoint and registered in the PeerApplication identified by the specified Guid.
Public methodGetPresenceInfoGets the available presence information for a PeerEndPoint. (Inherited from Peer.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInvite()Sends an invitation to join into peer collaboration sponsored by the sender. (Overrides Peer.Invite().)
Public methodInvite(PeerEndPoint)Sends an invitation to a specific endpoint to join into peer collaboration with the sender of the invitation.
Public methodInvite(PeerApplication, String, Byte[])Sends the specified invitation to join into the specified PeerApplication sponsored by the sender. (Overrides Peer.Invite(PeerApplication, String, Byte[]).)
Public methodInvite(PeerEndPoint, PeerApplication, String, Byte[])Sends the specified invitation to the specified PeerEndPoint to join into the specified PeerCollaboration application sponsored by the sender.
Public methodInviteAsync(Object)Begins an asynchronous invitation operation for an endpoint to join a PeerCollaboration application sponsored by the sender of the invitation. The invitation is identified using the specified Object. (Overrides Peer.InviteAsync(Object).)
Public methodInviteAsync(PeerEndPoint, Object)Begins an asynchronous invitation operation for the specified peer endpoint to join a PeerCollaboration application sponsored by the sender of the invitation. The invitation is identified using the specified Object.
Public methodInviteAsync(PeerApplication, String, Byte[], Object)Begins an asynchronous invitation operation for the specified peer endpoints to join the specified collaboration PeerApplication sponsored by the sender of the invitation. (Overrides Peer.InviteAsync(PeerApplication, String, Byte[], Object).)
Public methodInviteAsync(PeerEndPoint, String, Byte[], PeerApplication, Object)Begins an asynchronous invitation operation for the specified peerEndPoint to join the specified collaboration PeerApplication sponsored by the sender of the invitation.
Public methodInviteAsyncCancelCancels the invitation that was sent with the InviteAsync method. (Inherited from Peer.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnApplicationChangedRaises the ApplicationChanged event.
Protected methodOnInviteCompletedRaises the InviteCompleted event. (Inherited from Peer.)
Protected methodOnObjectChangedRaises the ObjectChanged event when a PeerObject is added, updated or removed by a remote peer.
Protected methodOnPresenceChangedRaises the PresenceChanged event when the PeerPresenceInfo of a peer has changed.
Protected methodOnSubscribeCompletedRaises the SubscribeCompleted event.
Public methodSubscribeSubscribes the calling peer to the PeerContact, and as a result, the peer will receive any future PeerCollaboration events associated with the PeerContact.
Public methodSubscribeAsyncAsynchronously subscribes the calling peer to the PeerContact, and as a result, the peer will receive any future PeerCollaboration events associated with the PeerContact.
Public methodToStringReturns a String representation of the DisplayName associated with the PeerContact. (Overrides Peer.ToString().)
Public methodToXmlSerializes the PeerContact to an XML string for persistent storage or network transfer.
Public methodUnsubscribeRemoves a subscription to the PeerContact and as a result the calling peer no longer receives PeerCollaboration events associated with the PeerContact.
Top
  NameDescription
Public eventApplicationChangedThis event is raised whenever an application associated with the PeerContact has changed.
Public eventInviteCompletedRaised when the invitation process for a remote peer has completed. (Inherited from Peer.)
Public eventObjectChangedThis event is signaled whenever a PeerObject associated with the PeerContact has changed.
Public eventPresenceChangedThis event is raised whenever the PeerContact has changed its presence status.
Public eventSubscribeCompletedRaised when a subscription operation has completed.
Top
  NameDescription
Explicit interface implemetationPrivate methodISerializable.GetObjectDataImplements the ISerializable interface and returns the data needed to serialize the PeerContact instance.
Top

A contact represents a trusted peer. A PeerContact object must be created for a remote peer or PeerNearMe for a user to collaborate with the remote peer when it is outside of the "People Near Me" scope. A PeerContact object can exist as either an application running on a remote computer, or the user of a remote computer. An instance of this class can be added to the ContactManager which stores the contact information in a persistent manner.

An application invitation from a PeerContact is both authenticated and encrypted. The UI dialog to accept or reject an invitation from a peer contact also indicates that that the inviter is trusted.

Subscribing to a PeerContact object means a remote peer can see its registered applications, objects and presence information. To subscribe to a PeerContact, the caller must be signed in to the peer collaboration infrastructure via SignIn or signed in via the Windows UI. All other operations do not require sign-in.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, 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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.