PeerApplication PeerApplication PeerApplication PeerApplication Constructors

定義

多載

PeerApplication() PeerApplication() PeerApplication()

初始化 PeerApplication 型別預設的新執行個體。Initializes a new default instance of the PeerApplication type.

PeerApplication(SerializationInfo, StreamingContext) PeerApplication(SerializationInfo, StreamingContext) PeerApplication(SerializationInfo, StreamingContext)

使用序列化所需的資料初始化 PeerApplication 類型的新執行個體。Initializes a new instance of the PeerApplication type with the data required for serialization.

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

使用提供的應用程式 ID、描述、範圍和資料項目初始化新的 PeerApplication 執行個體。Initializes a new PeerApplication instance with the supplied application ID, description, scope, and data elements.

備註

全域唯一IdPeerApplicationRegistrationType之前已成功註冊應用程式,就必須設定這個執行個體的屬性。The globally unique Id and PeerApplicationRegistrationType properties of this instance must be set before the application can successfully be registered.

PeerApplication() PeerApplication() PeerApplication()

初始化 PeerApplication 型別預設的新執行個體。Initializes a new default instance of the PeerApplication type.

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

備註

全域唯一IdPeerApplicationRegistrationType之前已成功註冊應用程式,就必須設定這個執行個體的屬性。The globally unique Id and PeerApplicationRegistrationType properties of this instance must be set before the application can successfully be registered.

PeerApplication(SerializationInfo, StreamingContext) PeerApplication(SerializationInfo, StreamingContext) PeerApplication(SerializationInfo, StreamingContext)

使用序列化所需的資料初始化 PeerApplication 類型的新執行個體。Initializes a new instance of the PeerApplication type with the data required for serialization.

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

參數

streamingContext
StreamingContext StreamingContext StreamingContext StreamingContext

PeerEndPoint 關聯的序列化目的地。The serialization destination associated with the PeerEndPoint.

備註

傳回PeerApplication完整限定名稱物件PeerName其內的物件。Returns a PeerApplication object with a name fully qualified by the PeerName object within it.

全域唯一IdPeerApplicationRegistrationType之前已成功註冊應用程式,就必須設定這個執行個體的屬性。The globally unique Id and PeerApplicationRegistrationType properties of this instance must be set before the application can successfully be registered.

另請參閱

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

使用提供的應用程式 ID、描述、範圍和資料項目初始化新的 PeerApplication 執行個體。Initializes a new PeerApplication instance with the supplied application ID, description, scope, and data elements.

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

參數

id
Guid Guid Guid Guid

使用者指定的 Guid,用來識別 PeerApplicationA user-specified Guid used to identify the PeerApplication.

description
String String String String

對等應用程式的 String描述。A String description of the peer application.

data
Byte[]

要與對等應用程式關聯的二進位資料物件,例如小型影像。A binary data object to associate with the peer application, such as a small image.

path
String String String String

對等應用程式的本機檔案系統路徑。The local file system path to the peer application.

commandLineArgs
String String String String

啟動對等應用程式的命令列引數。Command-line arguments for starting the peer application.

peerScope
PeerScope PeerScope PeerScope PeerScope

應用程式註冊對等共同作業的範圍。The scope in which the application will be registered for peer collaboration.

例外狀況

- 二進位資料物件的長度不能小於 1 或大於 16k。- Length of the binary data object cannot be less than one or greater than 16k.

  • id 已設定為 null
  • id is set to null.
  • 備註

    全域唯一IdPeerApplicationRegistrationType之前已成功註冊應用程式,就必須設定這個執行個體的屬性。The globally unique Id and PeerApplicationRegistrationType properties of this instance must be set before the application can successfully be registered.

    另請參閱

    適用於