PeerApplication Constructors

Definition

Initializes a new PeerApplication instance.

Overloads

PeerApplication()

Initializes a new default instance of the PeerApplication type.

PeerApplication(SerializationInfo, StreamingContext)

Initializes a new instance of the PeerApplication type with the data required for serialization.

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

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

Remarks

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

PeerApplication()

Initializes a new default instance of the PeerApplication type.

C#
public PeerApplication();

Remarks

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

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

PeerApplication(SerializationInfo, StreamingContext)

Initializes a new instance of the PeerApplication type with the data required for serialization.

C#
protected PeerApplication(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);

Parameters

serializationInfo
SerializationInfo

The SerializationInfo associated with the PeerEndPoint.

streamingContext
StreamingContext

The serialization destination associated with the PeerEndPoint.

Remarks

Returns a PeerApplication object with a name fully qualified by the PeerName object within it.

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

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

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

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

C#
public PeerApplication(Guid id, string description, byte[] data, string path, string commandLineArgs, System.Net.PeerToPeer.Collaboration.PeerScope peerScope);

Parameters

id
Guid

A user-specified Guid used to identify the PeerApplication.

description
String

A String description of the peer application.

data
Byte[]

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

path
String

The local file system path to the peer application.

commandLineArgs
String

Command-line arguments for starting the peer application.

peerScope
PeerScope

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

Exceptions

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

  • id is set to null.

Remarks

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

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1