Peer.Invite 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
發送邀請給 一個 Peer 特定的 PeerApplication。
多載
| 名稱 | Description |
|---|---|
| Invite(PeerApplication, String, Byte[]) |
發送邀請給 一個 Peer 特定的 PeerApplication。 |
| Invite() |
發送邀請給 一個 Peer 特定的 PeerApplication。 |
Invite(PeerApplication, String, Byte[])
發送邀請給 一個 Peer 特定的 PeerApplication。
public:
abstract System::Net::PeerToPeer::Collaboration::PeerInvitationResponse ^ Invite(System::Net::PeerToPeer::Collaboration::PeerApplication ^ applicationToInvite, System::String ^ message, cli::array <System::Byte> ^ invitationData);
public abstract System.Net.PeerToPeer.Collaboration.PeerInvitationResponse Invite(System.Net.PeerToPeer.Collaboration.PeerApplication applicationToInvite, string message, byte[] invitationData);
abstract member Invite : System.Net.PeerToPeer.Collaboration.PeerApplication * string * byte[] -> System.Net.PeerToPeer.Collaboration.PeerInvitationResponse
Public MustOverride Function Invite (applicationToInvite As PeerApplication, message As String, invitationData As Byte()) As PeerInvitationResponse
參數
- applicationToInvite
- PeerApplication
PeerApplication邀請函就是為了這個而寄出的。
- message
- String
一則訊息,隨應用程式邀請一併發送給遠端對等端。 訊息最多只能有 255 個 Unicode 字元。
- invitationData
- Byte[]
一個使用者定義的資料塊,用來與邀請函關聯。 其大小不得超過 16,384 位元組。
傳回
收到邀請的同儕給了A PeerInvitationResponse 。
例外狀況
該申請未註冊合作。
invitationData 大於 16,384 位元組。
邀請過程中發生了錯誤。
目前執行的應用程式並未註冊於同儕協作基礎設施。
備註
呼叫此方法需要一個 PermissionState 。Unrestricted 此狀態是在對等協作會話開始時建立的。
適用於
Invite()
發送邀請給 一個 Peer 特定的 PeerApplication。
public:
abstract System::Net::PeerToPeer::Collaboration::PeerInvitationResponse ^ Invite();
public abstract System.Net.PeerToPeer.Collaboration.PeerInvitationResponse Invite();
abstract member Invite : unit -> System.Net.PeerToPeer.Collaboration.PeerInvitationResponse
Public MustOverride Function Invite () As PeerInvitationResponse
傳回
收到邀請的同儕給了A PeerInvitationResponse 。
例外狀況
邀請過程中發生了錯誤。
目前執行中的應用程式尚未在 Peer Collaboration 基礎設施中註冊。
備註
呼叫此方法需要一個 PermissionState 。Unrestricted 此狀態是在同儕協作會議開始時建立的。