PeerCollaboration 類別

定義

與對等共同作業基礎結構互動。Interacts with the Peer Collaboration infrastructure. 許多核心共同作業的案例都是從這個類別開始的。Many of the core collaboration scenarios begin with this class.

public ref class PeerCollaboration abstract sealed
public static class PeerCollaboration
type PeerCollaboration = class
Public Class PeerCollaboration
繼承
PeerCollaboration

備註

這個類別是靜態類別,它是密封的、抽象的,而且沒有公用的函式。This class is a static class - it is sealed, abstract and does not have a public constructor. 它是用來包含和管理已接受共同作業會話邀請之對等的應用程式、物件和目前狀態資訊。It is used to contain and manage application, object, and presence information for peers that have accepted invitations to a collaboration session. 就對等、物件和應用程式而言,PeerCollaboration 類別會提供三個存取子,一個用於每個集合,做為電腦上任何其他情況的介面或連接點。In terms of peers, objects, and applications, the PeerCollaboration class provides three accessors, one for each collection, as an interface or point of connectivity for whatever else is happening on the machine. 此類別無法被繼承;如果將此密封類別指定為基類,則會發生編譯時期錯誤。This class cannot be inherited; a compile-time error will occur if this sealed class is specified as the base class.

此類別中的方法和屬性可用於:Methods and properties in this class can be used to:

  • 啟動和管理協同作業應用程式Launch and manage collaborative applications

  • 註冊和刪除應用程式和共同工作物件 (例如憑證、圖片、虛擬人偶和文字描述) Register and delete applications and collaboration objects (such as certificates, pictures, avatars, and text descriptions)

  • 邀請對等的共同作業會話,包括範圍和物件的專案,這些專案會透過網際網路識別Invite peers to collaboration sessions, including items such as scope and objects which will identify them over the Internet

  • 允許同事與共同作業 SignIn SignOut 基礎結構、管理連絡人清單,或將其目前狀態發佈到彼此Allow peers to SignIn and SignOut of the collaboration infrastructure, manage lists of contacts, or publish their presence to each other

  • 利用 SynchronizingObject 屬性和事件來協調非同步應用程式通訊,特別是針對名稱、目前狀態、應用程式或其他物件的變更。Utilize SynchronizingObject properties and events to coordinate asynchronous application communication, especially for changes in name, presence, application, or other objects.

「連結-本機雲端」、「呼叫對等體的子網」和「NearMe 範圍」是同義字匯。"Link-local cloud", "subnet of the calling peer", and "NearMe scope" are synonymous terms. 「網際網路範圍」和「無伺服器目前狀態」是同義的。"Internet scope" and "serverless presence" are synonymous. 網站-本機在共同作業 PnrpScope 命名空間中沒有對等的。The site-local PnrpScope has no equivalent in the collaboration namespace.

在此類別中使用每個方法或屬性需要 PermissionStateUnrestrictedThe use of every method or property in this class requires a PermissionState of Unrestricted. 當對等共同作業會話開始時,就會建立此狀態。This state is created when the peer collaboration session begins.

屬性

ApplicationLaunchInfo

取得 PeerApplicationLaunchInfo 物件,內含因遠端對等電腦的共同作業要求而啟動應用程式時所需的資訊。Gets the PeerApplicationLaunchInfo object that contains information needed when an application is started due to a collaboration request from a remote peer.

ContactManager

取得持續性存放區,內含遠端電腦的所有 PeerContact 物件。Gets the persistent store that contains all PeerContact objects for remote peers.

LocalEndPointName

取得或設定與呼叫的對等電腦相關聯的 PeerEndPoint 的名稱。Gets or sets the name of the PeerEndPoint associated with the calling peer.

LocalPresenceInfo

取得或設定在 PeerCollaboration 基礎結構中,呼叫的對等電腦的顯示狀態。Gets or sets the presence for the calling peer within the PeerCollaboration infrastructure.

SignInScope

取得 PeerScope,呼叫的對等電腦可以對其發行顯示狀態、功能和物件資訊。Gets the PeerScope to which the calling peer can publish presence, capability and object information.

SynchronizingObject

取得或設定所有事件處理常式的事件處理常式回呼物件。Gets or sets the event handler callback object for all event handlers.

方法

DeleteObject(PeerObject)

取消註冊與呼叫對等相關聯的 PeerObjectUnregisters a PeerObject associated with the calling peer.

GetLocalRegisteredApplications()

取得在本機電腦上註冊的所有 PeerApplication 物件。Gets all PeerApplication objects that are registered on the local machine.

GetLocalRegisteredApplications(PeerApplicationRegistrationType)

為指定的 PeerApplication,取得本機電腦上註冊之所有 PeerApplicationRegistrationType 物件的集合。Gets a collection of all PeerApplication objects that are registered on the local machine for the specified PeerApplicationRegistrationType.

GetLocalSetObjects()

取得所有 PeerObject 執行個體,這些執行個體是由呼叫的對等電腦向這部電腦上的 PeerCollaboration 基礎結構註冊的。Obtains all PeerObject instances registered by the calling peer with the PeerCollaboration infrastructure on this machine.

GetPeersNearMe()

傳回呼叫的對等電腦的網路子網路上,目前登入的所有 PeerCollaboration 端點的集合。Returns a collection of all the PeerCollaboration endpoints currently signed in on the network subnet of the calling peer.

RegisterApplication(PeerApplication, PeerApplicationRegistrationType)

針對與發出呼叫的對等進行共同作業工作階段註冊指定的 PeerApplicationRegisters the specified PeerApplication for a collaboration session with the calling peer.

SetObject(PeerObject)

註冊與呼叫對等相關聯的 PeerObjectRegisters a PeerObject associated with the calling peer.

SignIn(PeerScope)

使用指定的 PeerScope 將對等登入至共同作業基礎結構。Signs the peer into the collaboration infrastructure with the specified PeerScope.

SignOut(PeerScope)

將對等登出指定的範圍。Signs the peer out of the specified scope.

UnregisterApplication(PeerApplication, PeerApplicationRegistrationType)

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

事件

LocalApplicationChanged

會在本端主機上本機對等電腦的 PeerApplication 中的 PeerApplicationCollection 變更時引發。Raised when a PeerApplication in the PeerApplicationCollection for the local peer on the local host has changed.

LocalNameChanged

會在本機對等電腦本端主機上的 PeerEndPoint 名稱變更時引發。Raised when the name of the PeerEndPoint on the local host for the local peer has changed.

LocalObjectChanged

本端主機上本機對等電腦的 PeerObject 中的 PeerObjectCollection 已變更。A PeerObject in the PeerObjectCollection for the local peer on the local host has changed.

LocalPresenceChanged

本端主機上本機對等電腦的 PeerPresenceInfo 已變更。The PeerPresenceInfo of the local peer on the local host has changed.

適用於