PeerContact.IsSubscribed Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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.

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

public bool IsSubscribed { get; internal set; }

Property Value

Type: System.Boolean

True if this PeerContact is subscribed to this endpoint, false if the contact has not subscribed or has unsubscribed.

Exception Condition
ObjectDisposedException

This PeerContact object has been disposed.

In many instances, a PeerEndPoint is not the same as a peer host. A peer host has an instance within the ContactManager of the remote peer, and the relationship is that they have invited the peer to collaborate. An endpoint has a "Me" instance within its own contact manager and the peer host, but the relationship is not specified.

If the peer host is in the ContactManager, and the peer contact chooses not to Subscribe, its SubscriptionType can have a value of blocked, rather than deleting its entry from the host Contact Manager.

There is a many-to-many relationship between local peers, remote peers, peer hosts, and subscriptions. Subscriptions are per user, rather than per process, per application, or per domain. Consequently, the subscriptions associated with a PeerContact object are the list of contacts to which it has subscribed and from which it expects updates. Those contacts either have updated their own application, object, and presence information, or they have updated information regarding contacts in the ContactManager.

This property always returns true if the object is a PeerContact which represents the local or "Me" contact, since a contact is always subscribed to itself.

.NET Framework
Available since 3.5
Return to top
Show: