PeerContact.Invite 方法

定義

傳送邀請,以加入寄件者所贊助的對等共同作業活動。

多載

Invite(PeerApplication, String, Byte[])

傳送指定的邀請,以加入寄件者所贊助的特定 PeerApplication

Invite(PeerEndPoint, PeerApplication, String, Byte[])

將指定的邀請傳送至指定的 PeerEndPoint,以加入寄件者所贊助的特定 PeerCollaboration 應用程式。

Invite()

傳送邀請,以加入寄件者所贊助的對等共同作業。

Invite(PeerEndPoint)

將邀請傳送至特定端點,以加入邀請的寄件者所參與的對等共同作業。

備註

呼叫端不需要登入基礎結構, System.Net.PeerToPeer.Collaboration 這個方法才能順利完成。 受邀者中的 , 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[]

使用者定義的資料 Blob,用於與邀請建立關聯。 大小可超過 16,384 個位元組。

傳回

PeerInvitationResponse,來自收到邀請的對等個體。

屬性

例外狀況

PeerApplication 不可以是 null

PeerEndPoint 物件已經處置。

目前應用程式的 Id 不存在或者是空的。

備註

呼叫端不需要登入基礎結構, System.Net.PeerToPeer.Collaboration 這個方法才能順利完成。 受邀者中的 , PeerInvitationResponse 與接受邀請以共同作業的受邀者不同。 如果邀請傳送至尚未安裝應用程式的遠端對等,則會自動拒絕邀請。

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

給呼叫者的注意事項

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

另請參閱

適用於

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[]

使用者定義的資料 Blob,用於與邀請建立關聯。 大小可超過 16,384 個位元組。

傳回

PeerInvitationResponse,來自收到邀請的對等個體。

屬性

例外狀況

PeerEndPoint 中的端點不可以是 null

PeerEndPoint 物件已經處置。

目前應用程式的 Id 不存在或者是空的。

備註

呼叫端不需要登入基礎結構, System.Net.PeerToPeer.Collaboration 這個方法才能順利完成。 受邀者中的 , PeerInvitationResponse 與接受邀請以共同作業的受邀者不同。 如果邀請傳送至尚未安裝應用程式的遠端對等,則會自動拒絕邀請。

給呼叫者的注意事項

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

另請參閱

適用於

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

傳回

PeerInvitationResponse,來自收到邀請的對等個體。

屬性

例外狀況

PeerEndPoint 物件已經處置。

目前應用程式的 Id 不存在。

備註

呼叫端不需要登入基礎結構, System.Net.PeerToPeer.Collaboration 這個方法才能順利完成。 受邀者中的 , PeerInvitationResponse 與接受邀請以共同作業的受邀者不同。 如果邀請傳送至尚未安裝應用程式的遠端對等,則會自動拒絕邀請。

給呼叫者的注意事項

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

另請參閱

適用於

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,來自收到邀請的對等端點。

屬性

例外狀況

PeerEndPoint 不可以是 null

PeerEndPoint 物件已經處置。

  • 無法完成 Invite() 作業。

  • 目前執行的應用程式未向對等共同作業基礎結構註冊。

  • 物件所指定的 EndPointPeerEndPoint 無效。

備註

呼叫端不需要登入基礎結構, System.Net.PeerToPeer.Collaboration 這個方法才能順利完成。 受邀者中的 , PeerInvitationResponse 與接受邀請以共同作業的受邀者不同。 如果邀請傳送至尚未安裝應用程式的遠端對等,則會自動拒絕邀請。

給呼叫者的注意事項

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

另請參閱

適用於