PeerNameRegistration.Stop 方法
定义
public:
void Stop();
[System.Security.SecurityCritical]
public void Stop ();
[<System.Security.SecurityCritical>]
member this.Stop : unit -> unit
Public Sub Stop ()
- 属性
例外
尚未注册 PeerName 属性。The PeerName property has not yet been registered. 使用空构造函数构造 PeerNameRegistration 对象时会出现此种情况。This occurs when a PeerNameRegistration object is constructed using the empty constructor. 调用 Start() 前必须在此实例中填充 PeerName 属性。The PeerName property must be populated in this instance prior to calling Start().
此对象此前让 Dispose() 对其进行调用。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 parameterless constructor. 在此状态下,其所有属性都假设没有值。In this state, all of its properties are assumed to have no value. 此 Start 方法可用于重新启动它。The Start method may be used to restart it.
同一对等名称可以具有多个注册对象。It is possible to have multiple registration objects for the same peer name. 在这种情况下,如果对等名称是安全的,则每个实例将表示在不同的 PNRP 云中的注册。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.