PeerObject Constructor (Guid, array<Byte>^, PeerScope)

 

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

Namespace:   System.Net.PeerToPeer.Collaboration
Assembly:  System.Net (in System.Net.dll)

public:
PeerObject(
	Guid Id,
	array<unsigned char>^ data,
	PeerScope peerScope
)

Parameters

Id
Type: System::Guid

The user-defined identifier for the PeerObject.

data
Type: array<System::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
Type: System.Net.PeerToPeer.Collaboration::PeerScope

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

Exception Condition
ArgumentException

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

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.

.NET Framework
Available since 3.5
Return to top
Show: