This documentation is archived and is not being maintained.

PeerNearMe Class

Represents a peer located by the "People Near Me" infrastructure.


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

public class PeerNearMe : Peer, IEquatable<PeerNearMe>, 

The PeerNearMe type exposes the following members.

Public methodPeerNearMe()Initializes a new default instance of the PeerNearMe class.
Protected methodPeerNearMe(SerializationInfo, StreamingContext)Initializes a new PeerNearMe instance with the associated parameters required for serialization.

Public propertyIsOnlineGets a value specifying if the Peer is currently 'online'. (Inherited from Peer.)
Public propertyNicknameGets or sets a String representing the Nickname of the PeerNearMe object.
Public propertyPeerEndPointsGets the PeerEndPointCollection associated with the Peer. (Inherited from Peer.)
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.)

Public methodAddToContactManager()Generates a PeerContact from the PeerNearMe object and associates it with the ContactManager.
Public methodAddToContactManager(String, String, MailAddress)Generates a PeerContact with the associated descriptive parameters from the PeerNearMe object and associates it with the ContactManager.
Public methodStatic memberCreateFromPeerEndPointGenerates a PeerNearMe object from the provided PeerEndPoint.
Public methodDispose()Releases all resources used by the Peer object. (Inherited from Peer.)
Protected methodDispose(Boolean)Releases the unmanaged resources used by the PeerNearMe object and optionally releases the managed resources. (Overrides Peer.Dispose(Boolean).)
Public methodEquals(Object)Compares the PeerNearMe 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(PeerNearMe)Compares the PeerNearMe to the specified PeerNearMe instance.
Public methodStatic memberEquals(Object, Object)Determines whether the specified PeerNearMe 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 methodGetHashCodeReturns the hash code for the PeerNearMe instance. (Overrides Object.GetHashCode().)
Protected methodGetObjectDataPopulates a SerializationInfo with the data required to serialize the specified PeerNearMe. A derived type must call the base type GetObjectData method. (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 methodGetPresenceInfoGets the available presence information for a PeerEndPoint. (Inherited from Peer.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodInternalRefreshDataInitiates a network operation to retrieve the application, object and presence data specific to a PeerNearMe instance.
Public methodInvite()Sends an invitation to join a peer collaboration application to a remote peer. (Overrides Peer.Invite().)
Public methodInvite(PeerApplication, String, Byte[])Sends an invitation to join a peer collaboration application to a remote peer that includes data that describes or specifies the application invite. (Overrides Peer.Invite(PeerApplication, String, Byte[]).)
Public methodInviteAsync(Object)Receives an invitation response from a peer regarding joining a peer collaboration application. (Overrides Peer.InviteAsync(Object).)
Public methodInviteAsync(PeerApplication, String, Byte[], Object)Receives an invitation response from a peer regarding an invitation to a peer collaboration application. (Overrides Peer.InviteAsync(PeerApplication, String, Byte[], Object).)
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 methodOnInviteCompletedRaises the InviteCompleted event. (Inherited from Peer.)
Protected methodOnRefreshDataCompletedSignals the RefreshDataCompleted event.
Public methodRefreshDataInitiates a network operation to retrieve the application, object and presence data specific to a PeerNearMe instance.
Public methodRefreshDataAsyncInitiates a network operation to retrieve the application, object and presence data specific to a PeerNearMe instance.
Public methodToStringReturns String that represents a PeerNearMe instance. (Overrides Peer.ToString().)

Public eventInviteCompletedRaised when the invitation process for a remote peer has completed. (Inherited from Peer.)
Public eventStatic memberPeerNearMeChangedSignaled when a new PeerNearMe instance is found, no longer available, or the associated PeerEndPoint object information has changed.
Public eventRefreshDataCompletedSignaled when the RefreshData or RefreshDataAsync operation for the PeerNearMe instance is completed.

Explicit interface implemetationPrivate methodISerializable.GetObjectDataPopulates the current PeerNearMe instance with the data obtained from the serialized source.

An instance of this class cannot be created directly. Instead, a reference to the peers "near" the calling peer is obtained by using the static GetPeersNearMe method to return a collection of nearby peers.

A peer represented by a PeerNearMe object is not necessarily in the calling peer's address book.

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