PeerNameRegistration.Stop Method ()

 

Unregisters the peer name specified in the PeerName property from all the clouds in which it was registered.

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

[SecurityCriticalAttribute]
public void Stop()

Exception Condition
InvalidOperationException

The PeerName property has not yet been registered. This occurs when a PeerNameRegistration object is constructed using the empty constructor. The PeerName property must be populated in this instance prior to calling Start.

ObjectDisposedException

This object had Dispose() called on it previously.

After the registration process has been stopped, the registration object's state is equal to the state directly after being constructed by the default constructor. In this state, all of its properties are assumed to have no value. The Start method may be used to restart it.

It is possible to have multiple registration objects for the same peer name. In such a case, if the peer name is secured, each instance will represent a registration in a different PNRP cloud. However, if the peer name is not secured, it can be registered in the same cloud multiple times.

If this instance is already stopped, calling this method has no effect.

.NET Framework
Available since 3.5
Return to top
Show: