PeerCollaboration.SignOut(PeerScope) 方法

定義

將對等登出指定的範圍。

public:
 static void SignOut(System::Net::PeerToPeer::Collaboration::PeerScope peerScope);
[System.Security.SecurityCritical]
public static void SignOut (System.Net.PeerToPeer.Collaboration.PeerScope peerScope);
[<System.Security.SecurityCritical>]
static member SignOut : System.Net.PeerToPeer.Collaboration.PeerScope -> unit
Public Shared Sub SignOut (peerScope As PeerScope)

參數

peerScope
PeerScope

PeerScope 指定的範圍列舉。

屬性

例外狀況

peerScope 參數包含無效的列舉值。

SignOut(PeerScope) 作業無法完成。

備註

這個方法不是應用程式特定的作業,而登出可能會影響目前正在執行的其他應用程式。 如果使用者尚未登入指定的範圍,則呼叫此方法會導致無作業。

當使用者登出人員 Near Me 時,其已發佈的資訊會從 PeerCollaboration 端點物件集中刪除。 除了呼叫端對等所註冊的任何識別物件之外,還包含 LocalEndPointNameLocalPresenceInfo ,以及共同作業基礎結構。 由於刪除這項資訊,因此遠端對等或對等主機無法再進行共同作業。 從 類別的觀點來看 PeerCollaboration ,與信任連絡人共用相同資訊的其他共用並不相關;使用 PeerCollaboration 類別不會影響保存此資訊的其他物件,例如遠端對等 ContactManager 物件。 同樣地,從 ContactManager 中刪除對等不會影響其在共同作業應用程式中的存在;其他連絡人仍然可以檢視其存在狀態,並與它共同作業。

呼叫這個方法需要 PermissionStateUnrestricted 。 當共同作業會話開始時, Peer 就會建立此狀態。

適用於

另請參閱