PeerApplication 建構函式

定義

初始化新的 PeerApplication 執行個體。

多載

PeerApplication()

初始化 PeerApplication 型別預設的新執行個體。

PeerApplication(SerializationInfo, StreamingContext)

使用序列化所需的資料初始化 PeerApplication 類型的新執行個體。

PeerApplication(Guid, String, Byte[], String, String, PeerScope)

使用提供的應用程式 ID、描述、範圍和資料項目初始化新的 PeerApplication 執行個體。

備註

必須先設定這個實例的全域唯 Id 一屬性, PeerApplicationRegistrationType 才能成功註冊應用程式。

PeerApplication()

初始化 PeerApplication 型別預設的新執行個體。

public:
 PeerApplication();
public PeerApplication ();
Public Sub New ()

備註

必須先設定這個實例的全域唯 Id 一屬性, PeerApplicationRegistrationType 才能成功註冊應用程式。

適用於

PeerApplication(SerializationInfo, StreamingContext)

使用序列化所需的資料初始化 PeerApplication 類型的新執行個體。

protected:
 PeerApplication(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
protected PeerApplication (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
new System.Net.PeerToPeer.Collaboration.PeerApplication : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.PeerToPeer.Collaboration.PeerApplication
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)

參數

serializationInfo
SerializationInfo

SerializationInfo 關聯的 PeerEndPoint

streamingContext
StreamingContext

PeerEndPoint 關聯的序列化目的地。

備註

PeerApplication傳回具有物件內物件完整名稱的 PeerName 物件。

必須先設定這個實例的全域唯 Id 一屬性, PeerApplicationRegistrationType 才能成功註冊應用程式。

另請參閱

適用於

PeerApplication(Guid, String, Byte[], String, String, PeerScope)

使用提供的應用程式 ID、描述、範圍和資料項目初始化新的 PeerApplication 執行個體。

public:
 PeerApplication(Guid id, System::String ^ description, cli::array <System::Byte> ^ data, System::String ^ path, System::String ^ commandLineArgs, System::Net::PeerToPeer::Collaboration::PeerScope peerScope);
public PeerApplication (Guid id, string description, byte[] data, string path, string commandLineArgs, System.Net.PeerToPeer.Collaboration.PeerScope peerScope);
new System.Net.PeerToPeer.Collaboration.PeerApplication : Guid * string * byte[] * string * string * System.Net.PeerToPeer.Collaboration.PeerScope -> System.Net.PeerToPeer.Collaboration.PeerApplication
Public Sub New (id As Guid, description As String, data As Byte(), path As String, commandLineArgs As String, peerScope As PeerScope)

參數

id
Guid

使用者指定的 Guid,用來識別 PeerApplication

description
String

對等應用程式的 String描述。

data
Byte[]

要與對等應用程式關聯的二進位資料物件,例如小型影像。

path
String

對等應用程式的本機檔案系統路徑。

commandLineArgs
String

啟動對等應用程式的命令列引數。

peerScope
PeerScope

應用程式註冊對等共同作業的範圍。

例外狀況

  • 二進位資料物件的長度不能小於 1 或大於 16k。

  • id 設定為 null

備註

必須先設定這個實例的全域唯 Id 一屬性, PeerApplicationRegistrationType 才能成功註冊應用程式。

另請參閱

適用於