PeerObject 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 PeerObject 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| PeerObject() |
初始化該類別的新預設實例 PeerObject 。 |
| PeerObject(SerializationInfo, StreamingContext) |
初始化 PeerObject 一個新實例,並附上序列化所需的相關參數。 |
| PeerObject(Guid, Byte[], PeerScope) |
初始化一個帶有相關作用域與資料的新 PeerObject 實例。 |
備註
實例建構完成 PeerObject 後,必須呼叫該 SetObject 方法以與 Peer Collaboration 基礎設施發佈物件。
PeerObject()
初始化該類別的新預設實例 PeerObject 。
public:
PeerObject();
public PeerObject();
Public Sub New ()
備註
實例建構完成 PeerObject 後,必須呼叫該 SetObject 方法以發佈 與 PeerObject Peer Collaboration 基礎設施。
另請參閱
適用於
PeerObject(SerializationInfo, StreamingContext)
初始化 PeerObject 一個新實例,並附上序列化所需的相關參數。
protected:
PeerObject(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
protected PeerObject(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
new System.Net.PeerToPeer.Collaboration.PeerObject : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.PeerToPeer.Collaboration.PeerObject
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)
參數
- serializationInfo
- SerializationInfo
- streamingContext
- StreamingContext
與 PeerObject相關聯的序列化目的地。
另請參閱
適用於
PeerObject(Guid, Byte[], PeerScope)
初始化一個帶有相關作用域與資料的新 PeerObject 實例。
public:
PeerObject(Guid Id, cli::array <System::Byte> ^ data, System::Net::PeerToPeer::Collaboration::PeerScope peerScope);
public PeerObject(Guid Id, byte[] data, System.Net.PeerToPeer.Collaboration.PeerScope peerScope);
new System.Net.PeerToPeer.Collaboration.PeerObject : Guid * byte[] * System.Net.PeerToPeer.Collaboration.PeerScope -> System.Net.PeerToPeer.Collaboration.PeerObject
Public Sub New (Id As Guid, data As Byte(), peerScope As PeerScope)
參數
- Id
- Guid
使用者定義的識別碼。PeerObject
- data
- Byte[]
一個包含關於 的資料 PeerObject塊。 此參數的大小限制為大小不等於16K。
- peerScope
- PeerScope
指定將被登記的 PeerObject 範圍。
例外狀況
此方法所提供的其中一個論點並不成立。
備註
Id此建構子所使用的參數值會自動生成。 實例建構完成 PeerObject 後,必須呼叫該 SetObject 方法以發佈 與 PeerObject Peer Collaboration 基礎設施。