PeerContact.Invite 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
發送邀請加入由發送者主辦的同儕合作活動。
多載
| 名稱 | Description |
|---|---|
| Invite(PeerApplication, String, Byte[]) |
發送指定的邀請,邀請他們加入由發送者贊助的指定 PeerApplication 活動。 |
| Invite(PeerEndPoint, PeerApplication, String, Byte[]) |
發送指定的邀請給指定的 PeerEndPoint 人,邀請他們加入由發送者贊助的指定 PeerCollaboration 應用程式。 |
| Invite() |
發送邀請加入由發送者贊助的同儕協作。 |
| Invite(PeerEndPoint) |
向特定端點發送邀請,與邀請發送者進行對等協作。 |
備註
呼叫者無需 System.Net.PeerToPeer.Collaboration 登入基礎設施即可成功完成此方法。 受邀者的A PeerInvitationResponse 不等於受邀者接受合作邀請。 若邀請寄送給尚未安裝該應用程式的遠端對等端,邀請將自動被拒絕。
Invite(PeerApplication, String, Byte[])
發送指定的邀請,邀請他們加入由發送者贊助的指定 PeerApplication 活動。
public:
override System::Net::PeerToPeer::Collaboration::PeerInvitationResponse ^ Invite(System::Net::PeerToPeer::Collaboration::PeerApplication ^ applicationToInvite, System::String ^ message, cli::array <System::Byte> ^ invitationData);
[System.Security.SecurityCritical]
public override System.Net.PeerToPeer.Collaboration.PeerInvitationResponse Invite(System.Net.PeerToPeer.Collaboration.PeerApplication applicationToInvite, string message, byte[] invitationData);
[<System.Security.SecurityCritical>]
override this.Invite : System.Net.PeerToPeer.Collaboration.PeerApplication * string * byte[] -> System.Net.PeerToPeer.Collaboration.PeerInvitationResponse
Public Overrides Function Invite (applicationToInvite As PeerApplication, message As String, invitationData As Byte()) As PeerInvitationResponse
參數
- applicationToInvite
- PeerApplication
PeerApplication邀請函就是為了這個而寄出的。
- message
- String
一則訊息,隨應用程式邀請一併發送給遠端對等端。
- invitationData
- Byte[]
一個使用者定義的資料塊,用來與邀請函關聯。 其大小不得超過 16,384 位元組。
傳回
收到邀請的貴族給了A PeerInvitationResponse 。
- 屬性
例外狀況
PeerApplication 不可以是 null。
PeerEndPoint該物體已被處理。
目前應用程式的 不 Id 存在或是空的。
備註
呼叫者無需 System.Net.PeerToPeer.Collaboration 登入基礎設施即可成功完成此方法。 受邀者的A PeerInvitationResponse 不等於受邀者接受合作邀請。 若邀請寄送給尚未安裝該應用程式的遠端對等端,邀請將自動被拒絕。
呼叫此方法需要一個 PermissionState 。Unrestricted 此狀態是在對等協作會話開始時建立的。
給呼叫者的注意事項
呼叫此方法需要一個 PermissionState 。Unrestricted 此狀態是在對等協作會話開始時建立的。
另請參閱
適用於
Invite(PeerEndPoint, PeerApplication, String, Byte[])
發送指定的邀請給指定的 PeerEndPoint 人,邀請他們加入由發送者贊助的指定 PeerCollaboration 應用程式。
public:
System::Net::PeerToPeer::Collaboration::PeerInvitationResponse ^ Invite(System::Net::PeerToPeer::Collaboration::PeerEndPoint ^ peerEndPoint, System::Net::PeerToPeer::Collaboration::PeerApplication ^ applicationToInvite, System::String ^ message, cli::array <System::Byte> ^ invitationData);
[System.Security.SecurityCritical]
public System.Net.PeerToPeer.Collaboration.PeerInvitationResponse Invite(System.Net.PeerToPeer.Collaboration.PeerEndPoint peerEndPoint, System.Net.PeerToPeer.Collaboration.PeerApplication applicationToInvite, string message, byte[] invitationData);
[<System.Security.SecurityCritical>]
override this.Invite : System.Net.PeerToPeer.Collaboration.PeerEndPoint * System.Net.PeerToPeer.Collaboration.PeerApplication * string * byte[] -> System.Net.PeerToPeer.Collaboration.PeerInvitationResponse
Public Function Invite (peerEndPoint As PeerEndPoint, applicationToInvite As PeerApplication, message As String, invitationData As Byte()) As PeerInvitationResponse
參數
- peerEndPoint
- PeerEndPoint
發送邀請的端點或遠端節點。
- applicationToInvite
- PeerApplication
邀請函所寄出的申請表。
- message
- String
一則訊息,隨應用程式邀請一併發送給遠端對等端。 訊息最多只能有 255 個 Unicode 字元。
- invitationData
- Byte[]
一個使用者定義的資料塊,用來與邀請函關聯。 其大小不得超過 16,384 位元組。
傳回
收到邀請的貴族給了A PeerInvitationResponse 。
- 屬性
例外狀況
端peerEndPoint點 在 中不可能 。null
PeerApplication 物件不可能是空的。
PeerApplication 且 PeerEndPoint 物件不可能是
null。
PeerEndPoint該物體已被處理。
目前應用程式的 不 Id 存在或是空的。
備註
呼叫者無需 System.Net.PeerToPeer.Collaboration 登入基礎設施即可成功完成此方法。 受邀者的A PeerInvitationResponse 不等於受邀者接受合作邀請。 若邀請寄送給尚未安裝該應用程式的遠端對等端,邀請將自動被拒絕。
給呼叫者的注意事項
呼叫此方法需要一個 PermissionState 。Unrestricted 此狀態是在對等協作會話開始時建立的。
另請參閱
適用於
Invite()
發送邀請加入由發送者贊助的同儕協作。
public:
override System::Net::PeerToPeer::Collaboration::PeerInvitationResponse ^ Invite();
[System.Security.SecurityCritical]
public override System.Net.PeerToPeer.Collaboration.PeerInvitationResponse Invite();
[<System.Security.SecurityCritical>]
override this.Invite : unit -> System.Net.PeerToPeer.Collaboration.PeerInvitationResponse
Public Overrides Function Invite () As PeerInvitationResponse
傳回
收到邀請的貴族給了A PeerInvitationResponse 。
- 屬性
例外狀況
PeerEndPoint該物體已被處理。
目前的應用程式中,該 不 Id 存在。
備註
呼叫者無需 System.Net.PeerToPeer.Collaboration 登入基礎設施即可成功完成此方法。 受邀者的A PeerInvitationResponse 不等於受邀者接受合作邀請。 若邀請寄送給尚未安裝該應用程式的遠端對等端,邀請將自動被拒絕。
給呼叫者的注意事項
呼叫此方法需要一個 PermissionState 。Unrestricted 此狀態是在對等協作會話開始時建立的。
另請參閱
適用於
Invite(PeerEndPoint)
向特定端點發送邀請,與邀請發送者進行對等協作。
public:
System::Net::PeerToPeer::Collaboration::PeerInvitationResponse ^ Invite(System::Net::PeerToPeer::Collaboration::PeerEndPoint ^ peerEndPoint);
[System.Security.SecurityCritical]
public System.Net.PeerToPeer.Collaboration.PeerInvitationResponse Invite(System.Net.PeerToPeer.Collaboration.PeerEndPoint peerEndPoint);
[<System.Security.SecurityCritical>]
override this.Invite : System.Net.PeerToPeer.Collaboration.PeerEndPoint -> System.Net.PeerToPeer.Collaboration.PeerInvitationResponse
Public Function Invite (peerEndPoint As PeerEndPoint) As PeerInvitationResponse
參數
- peerEndPoint
- PeerEndPoint
收到邀請的終點。
傳回
PeerInvitationResponse A是來自收到邀請的同儕端點。
- 屬性
例外狀況
PeerEndPoint 不可以是 null。
PeerEndPoint該物體已被處理。
無法完成 Invite() 運作。
目前執行的應用程式並未註冊於同儕協作基礎設施。
EndPoint 由 PeerEndPoint 物件指定 的 並不有效。
備註
呼叫者無需 System.Net.PeerToPeer.Collaboration 登入基礎設施即可成功完成此方法。 受邀者的A PeerInvitationResponse 不等於受邀者接受合作邀請。 若邀請寄送給尚未安裝該應用程式的遠端對等端,邀請將自動被拒絕。
給呼叫者的注意事項
呼叫此方法需要一個 PermissionState 。Unrestricted 此狀態是在對等協作會話開始時建立的。