Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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)
public void Stop()
ExceptionCondition
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

Supported in: 4.5.1, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft. All rights reserved.