PeerApplication Constructor (Guid, String^, array<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,
	array<unsigned char>^ 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: array<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.

Exception Condition
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
Available since 3.5
Return to top
Show: