PeerObject 构造函数
定义
初始化 PeerObject 类的新实例。Initializes a new instance of the PeerObject class.
重载
| PeerObject() |
初始化 PeerObject 类的新默认实例。Initializes a new default instance of the PeerObject class. |
| PeerObject(SerializationInfo, StreamingContext) |
使用序列化所需的关联参数初始化一个新的 PeerObject 实例。Initializes a new PeerObject instance with the associated parameters required for serialization. |
| PeerObject(Guid, Byte[], PeerScope) |
使用关联的范围和数据初始化一个新的 PeerObject 实例。Initializes a new PeerObject instance with the associated scope and data. |
注解
PeerObject构造实例后, SetObject 必须调用方法以将对象与对等方协作基础结构一起发布。After the PeerObject instance is constructed, the SetObject method must be called to publish the object with the Peer Collaboration infrastructure.
PeerObject()
初始化 PeerObject 类的新默认实例。Initializes a new default instance of the PeerObject class.
public:
PeerObject();
public PeerObject ();
Public Sub New ()
注解
PeerObject构造实例后, SetObject 必须调用方法将 PeerObject 与对等方协作基础结构一起发布。After the PeerObject instance is constructed, the SetObject method must be called to publish the PeerObject with the Peer Collaboration infrastructure.
另请参阅
适用于
PeerObject(SerializationInfo, StreamingContext)
使用序列化所需的关联参数初始化一个新的 PeerObject 实例。Initializes a new PeerObject instance with the associated parameters required for serialization.
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
与 SerializationInfo 关联的 PeerObject。The SerializationInfo associated with the PeerObject.
- streamingContext
- StreamingContext
与 PeerObject 相关联的序列化目标。The serialization destination associated with the PeerObject.
另请参阅
适用于
PeerObject(Guid, Byte[], PeerScope)
使用关联的范围和数据初始化一个新的 PeerObject 实例。Initializes a new PeerObject instance with the associated scope and data.
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 的用户定义标识符。The user-defined identifier for the PeerObject.
- data
- Byte[]
一个包含有关 PeerObject 的信息的数据 Blob。A data blob that contains information about the PeerObject. 此参数的大小必须小于或等于 16K。This parameter is limited a size that is less than or equal to 16K.
- peerScope
- PeerScope
指定 PeerObject 的注册范围。Specifies the scope in which the PeerObject is to be registered.
例外
为此方法提供的一个参数无效。One of the arguments provided to this method is not valid.
注解
Id此构造函数使用的参数值是自动生成的。The Id parameter value utilized by this constructor is auto generated. PeerObject构造实例后, SetObject 必须调用方法将 PeerObject 与对等方协作基础结构一起发布。After the PeerObject instance is constructed, the SetObject method must be called to publish the PeerObject with the Peer Collaboration infrastructure.