PeerCollaboration.UnregisterApplication(PeerApplication, PeerApplicationRegistrationType) 方法

定義

PeerCollaboration 基礎結構取消註冊指定的 PeerApplicationUnregisters the specified PeerApplication from the PeerCollaboration infrastructure.

public:
 static void UnregisterApplication(System::Net::PeerToPeer::Collaboration::PeerApplication ^ application, System::Net::PeerToPeer::Collaboration::PeerApplicationRegistrationType type);
[System.Security.SecurityCritical]
public static void UnregisterApplication (System.Net.PeerToPeer.Collaboration.PeerApplication application, System.Net.PeerToPeer.Collaboration.PeerApplicationRegistrationType type);
[<System.Security.SecurityCritical>]
static member UnregisterApplication : System.Net.PeerToPeer.Collaboration.PeerApplication * System.Net.PeerToPeer.Collaboration.PeerApplicationRegistrationType -> unit
Public Shared Sub UnregisterApplication (application As PeerApplication, type As PeerApplicationRegistrationType)

參數

application
PeerApplication

要針對呼叫對等取消註冊的 PeerApplicationThe PeerApplication to unregister for the calling peer.

type
PeerApplicationRegistrationType

為存在電腦的呼叫對等或所有對等執行的取消註冊類型。The type of deregistration to perform for either the calling peer or for all peers that exist on the machine.

屬性

例外狀況

指定應用程式的全域唯一 Id 不存在或者是空的。The globally unique Id for the specified application does not exist or is empty.

applicationtype 參數是設定為 nullThe application or type parameter is set to null.

type 參數未設為 PeerApplicationRegistrationType 中的已知值。The type parameter is not set to a known value in PeerApplicationRegistrationType.

備註

取消註冊 PeerApplication 會停止呼叫對等,而無法接收其共同作業邀請。Unregistering a PeerApplication stops the calling peer from receiving collaboration invitations for it. 如果要取消註冊的應用程式先前未註冊,則這是無作業。If the application being unregistered was not previously registered, this is a no-op.

呼叫這個方法需要 PermissionStateUnrestrictedCalling this method requires a PermissionState of Unrestricted. 此狀態會在共同 Peer 作業會話開始時建立。This state is created when the Peer collaboration session begins.

適用於

另請參閱