PeerObject Constructors

Definition

Initializes a new instance of the PeerObject class.

Overloads

PeerObject()

Initializes a new default instance of the PeerObject class.

PeerObject(SerializationInfo, StreamingContext)

Initializes a new PeerObject instance with the associated parameters required for serialization.

PeerObject(Guid, Byte[], PeerScope)

Initializes a new PeerObject instance with the associated scope and data.

Remarks

After the PeerObject instance is constructed, the SetObject method must be called to publish the object with the Peer Collaboration infrastructure.

PeerObject()

Initializes a new default instance of the PeerObject class.

C#
public PeerObject();

Remarks

After the PeerObject instance is constructed, the SetObject method must be called to publish the PeerObject with the Peer Collaboration infrastructure.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

PeerObject(SerializationInfo, StreamingContext)

Initializes a new PeerObject instance with the associated parameters required for serialization.

C#
protected PeerObject(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);

Parameters

serializationInfo
SerializationInfo

The SerializationInfo associated with the PeerObject.

streamingContext
StreamingContext

The serialization destination associated with the PeerObject.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

PeerObject(Guid, Byte[], PeerScope)

Initializes a new PeerObject instance with the associated scope and data.

C#
public PeerObject(Guid Id, byte[] data, System.Net.PeerToPeer.Collaboration.PeerScope peerScope);

Parameters

Id
Guid

The user-defined identifier for the PeerObject.

data
Byte[]

A data blob that contains information about the PeerObject. This parameter is limited a size that is less than or equal to 16K.

peerScope
PeerScope

Specifies the scope in which the PeerObject is to be registered.

Exceptions

One of the arguments provided to this method is not valid.

Remarks

The Id parameter value utilized by this constructor is auto generated. After the PeerObject instance is constructed, the SetObject method must be called to publish the PeerObject with the Peer Collaboration infrastructure.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1