PeerContact Class

PeerContact Class

.NET Framework (current version)
 

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

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

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

[SerializableAttribute]
public class PeerContact : Peer, IEquatable<PeerContact>, ISerializable

NameDescription
System_CAPS_protmethodPeerContact(SerializationInfo, StreamingContext)

No public constructor is defined for this class.

NameDescription
System_CAPS_pubpropertyCredentials

Gets or sets the X509Certificate (public key) for the peer identified by this PeerContact instance.

System_CAPS_pubpropertyDisplayName

Gets or sets a string which represents the display name of the PeerContact.

System_CAPS_pubpropertyEmailAddress

Gets or sets the email address associated with the PeerContact.

System_CAPS_pubpropertyIsOnline

Gets a value specifying if the Peer is currently 'online'.(Inherited from Peer.)

System_CAPS_pubpropertyIsSubscribed

Gets 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.

System_CAPS_pubpropertyNickname

Gets or sets a string which represents the Nickname of the PeerContact.

System_CAPS_pubpropertyPeerEndPoints

Gets the PeerEndPointCollection associated with this PeerContact.(Overrides Peer.PeerEndPoints.)

System_CAPS_pubpropertyPeerName

Gets or sets the PeerName associated with the PeerContact.

System_CAPS_pubpropertySubscribeAllowed

Gets 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.

System_CAPS_pubpropertySynchronizingObject

When 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.)

NameDescription
System_CAPS_pubmethodDispose()

Releases all resources used by the Peer object.(Inherited from Peer.)

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources and optionally releases the managed resources used by the PeerApplication object.(Overrides Peer.Dispose(Boolean).)

System_CAPS_pubmethodEquals(Object)

Compares the PeerContact instance to the specified object.(Overrides Object.Equals(Object).)

System_CAPS_pubmethodSystem_CAPS_staticEquals(Object, Object)

Determines whether the specified PeerContact instances are considered equal.

System_CAPS_pubmethodEquals(Peer)

Performs a case-sensitive comparison of the current Peer and the specified peer.(Inherited from Peer.)

System_CAPS_pubmethodEquals(PeerContact)

Compares the PeerContact to the specified PeerContact instance.

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticFromXml(String)

Creates a PeerContact instance based on provided XML data.

System_CAPS_pubmethodGetApplications()

Retrieves the PeerApplication objects that were registered by the remote peer into the local cache.

System_CAPS_pubmethodGetApplications(Guid)

Gets the collection of PeerApplication objects with the specified Guid from the local cache.

System_CAPS_pubmethodGetApplications(PeerEndPoint)

Gets the PeerApplicationCollection associated with the specified PeerEndPoint.

System_CAPS_pubmethodGetApplications(PeerEndPoint, Guid)

Gets the PeerApplicationCollection associated with the specified PeerEndPoint.

System_CAPS_pubmethodGetHashCode()

Returns the hash code for a PeerContact instance.(Overrides Object.GetHashCode().)

System_CAPS_protmethodGetObjectData(SerializationInfo, StreamingContext)

Populates a SerializationInfo object with the data needed to serialize the PeerContact.(Overrides Peer.GetObjectData(SerializationInfo, StreamingContext).)

System_CAPS_pubmethodGetObjects()

Gets the collection of data objects from a local cache.(Inherited from Peer.)

System_CAPS_pubmethodGetObjects(Guid)

Gets the Peer object associated with the supplied Guid from the PeerObjectCollection.(Inherited from Peer.)

System_CAPS_pubmethodGetObjects(PeerEndPoint)

Gets the PeerObjectCollection registered by the specified PeerEndPoint and stored in the local cache.

System_CAPS_pubmethodGetObjects(PeerEndPoint, Guid)

Gets the collection of peer objects registered by the specified PeerEndPoint and registered in the PeerApplication identified by the specified Guid.

System_CAPS_pubmethodGetPresenceInfo(PeerEndPoint)

Gets the available presence information for a PeerEndPoint.(Inherited from Peer.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodInvite()

Sends an invitation to join into peer collaboration sponsored by the sender.(Overrides Peer.Invite().)

System_CAPS_pubmethodInvite(PeerApplication, String, Byte[])

Sends the specified invitation to join into the specified PeerApplication sponsored by the sender. (Overrides Peer.Invite(PeerApplication, String, Byte[]).)

System_CAPS_pubmethodInvite(PeerEndPoint)

Sends an invitation to a specific endpoint to join into peer collaboration with the sender of the invitation.

System_CAPS_pubmethodInvite(PeerEndPoint, PeerApplication, String, Byte[])

Sends the specified invitation to the specified PeerEndPoint to join into the specified PeerCollaboration application sponsored by the sender.

System_CAPS_pubmethodInviteAsync(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).)

System_CAPS_pubmethodInviteAsync(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).)

System_CAPS_pubmethodInviteAsync(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.

System_CAPS_pubmethodInviteAsync(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.

System_CAPS_pubmethodInviteAsyncCancel(Object)

Cancels the invitation that was sent with the InviteAsync method. (Inherited from Peer.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodOnApplicationChanged(ApplicationChangedEventArgs)

Raises the ApplicationChanged event.

System_CAPS_protmethodOnInviteCompleted(InviteCompletedEventArgs)

Raises the InviteCompleted event.(Inherited from Peer.)

System_CAPS_protmethodOnObjectChanged(ObjectChangedEventArgs)

Raises the ObjectChanged event when a PeerObject is added, updated or removed by a remote peer.

System_CAPS_protmethodOnPresenceChanged(PresenceChangedEventArgs)

Raises the PresenceChanged event when the PeerPresenceInfo of a peer has changed.

System_CAPS_protmethodOnSubscribeCompleted(SubscribeCompletedEventArgs)

Raises the SubscribeCompleted event.

System_CAPS_pubmethodSubscribe()

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

System_CAPS_pubmethodSubscribeAsync(Object)

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

System_CAPS_pubmethodToString()

Returns a String representation of the DisplayName associated with the PeerContact.(Overrides Peer.ToString().)

System_CAPS_pubmethodToXml()

Serializes the PeerContact to an XML string for persistent storage or network transfer.

System_CAPS_pubmethodUnsubscribe()

Removes a subscription to the PeerContact and as a result the calling peer no longer receives PeerCollaboration events associated with the PeerContact.

NameDescription
System_CAPS_pubeventApplicationChanged

This event is raised whenever an application associated with the PeerContact has changed.

System_CAPS_pubeventInviteCompleted

Raised when the invitation process for a remote peer has completed.(Inherited from Peer.)

System_CAPS_pubeventObjectChanged

This event is signaled whenever a PeerObject associated with the PeerContact has changed.

System_CAPS_pubeventPresenceChanged

This event is raised whenever the PeerContact has changed its presence status.

System_CAPS_pubeventSubscribeCompleted

Raised when a subscription operation has completed.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodISerializable.GetObjectData(SerializationInfo, StreamingContext)

Implements the ISerializable interface and returns the data needed to serialize the PeerContact instance.

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
Available since 3.5

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

Return to top
Show:
© 2016 Microsoft