Export (0) Print
Expand All

PeerApplication Constructor (Guid, String, Byte[], String, String, PeerScope)

Initializes a new PeerApplication instance with the supplied application ID, description, scope, and data elements.

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

public PeerApplication(
	Guid id,
	string description,
	byte[] data,
	string path,
	string commandLineArgs,
	PeerScope peerScope
)

Parameters

id
Type: System.Guid

A user-specified Guid used to identify the PeerApplication.

description
Type: System.String

A String description of the peer application.

data
Type: System.Byte[]

A binary data object to associate with the peer application, such as a small image.

path
Type: System.String

The local file system path to the peer application.

commandLineArgs
Type: System.String

Command-line arguments for starting the peer application.

peerScope
Type: System.Net.PeerToPeer.Collaboration.PeerScope

The scope in which the application will be registered for peer collaboration.

ExceptionCondition
ArgumentException
  • Length of the binary data object cannot be less than one or greater than 16k.

  • id is set to null.

The globally unique Id and PeerApplicationRegistrationType properties of this instance must be set before the application can successfully be registered.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft