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

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 Sub New (
	id As Guid,
	description As String,
	data As Byte(),
	path As String,
	commandLineArgs As String,
	peerScope As PeerScope


Type: System.Guid

A user-specified Guid used to identify the PeerApplication.

Type: System.String

A String description of the peer application.

Type: System.Byte()

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

Type: System.String

The local file system path to the peer application.

Type: System.String

Command-line arguments for starting the peer application.

Type: System.Net.PeerToPeer.Collaboration.PeerScope

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

A new instance of the PeerApplication type.

Exception Condition
  • 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
© 2015 Microsoft