PeerObject Constructor (Guid, Byte[], PeerScope)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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,
	byte[] data,
	PeerScope peerScope
)

Parameters

Id
Type: System.Guid

The user-defined identifier for the PeerObject.

data
Type: 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: