ContactManager Class
Represents a collection of PeerContact objects which persist in a Windows Address Book.
Assembly: System.Net (in System.Net.dll)
The ContactManager type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | LocalContact | Gets the PeerContact representing the local peer. |
![]() | SynchronizingObject | 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. |
| Name | Description | |
|---|---|---|
![]() | AddContact | Adds the specified PeerContact to the ContactManager of the local peer. |
![]() | CreateContact | Creates a PeerContact instance for the specified PeerNearMe object. |
![]() | CreateContactAsync | Creates a contact instance for the specified PeerNearMe object. |
![]() | DeleteContact(PeerContact) | Removes the specified PeerContact from the ContactManager of the local peer. |
![]() | DeleteContact(PeerName) | Removes the PeerContact associated with the specified PeerName from the ContactManager of the local peer. |
![]() | Dispose | Releases all resources used by the ContactManager object. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetContact | Returns the PeerContact object for the specified PeerName. |
![]() | GetContacts | Returns a PeerContactCollection that contains all contacts within the ContactManager of the remote peer. |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | UpdateContact | Updates the data associated with the PeerContact. |
| Name | Description | |
|---|---|---|
![]() | ApplicationChanged | Raised whenever a PeerApplication associated with a PeerContact in the ContactManager has changed. |
![]() | CreateContactCompleted | Raised whenever a CreateContact method has completed. |
![]() | NameChanged | Raised whenever the PeerName associated with a PeerContact in the ContactManager has changed. |
![]() | ObjectChanged | Raised whenever an object within a contact’s registered PeerObject objects has changed. |
![]() | PresenceChanged | Raised whenever the presence status of a PeerContact in the ContactManager has changed. |
![]() | SubscriptionListChanged | Raised when the list of subscribed contacts changes. |
This class has no public constructors, since a reference to it is returned by the PeerCollaboration class.
Address books that are associated with PeerContact management include those associated with the host peer and a remote peer. Either computer may collaborate with other peers; when a peer is local to the remote peer but not the host peer, it can be added to the ContactManager of the host peer. Certain operations on the ContactManager class, such as AddContact and DeleteContact, correlate to the associated operations being performed on the Windows Address book of the remote peer.
The host peer has access to this persistent storage for PeerContact information, which can be associated with the applications in which a peer intends to participate. A PeerApplication can identify itself as a user of a ContactManager persistent store on a computer.
The following example code illustrates how to enumerate a PeerNearMe and add it as a PeerContact to the local ContactManager:
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.
