PeerName Constructor (String, PeerNameType)

Initializes a new instance of the PeerName class.

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

public PeerName(
	string classifier,
	PeerNameType peerNameType
)

Parameters

classifier
Type: System.String

String that contains the Peer Name to encode as a PeerName.

peerNameType
Type: System.Net.PeerToPeer.PeerNameType

PeerNameType enumeration value that specifies the type of peer name to create.

ExceptionCondition
ArgumentException

The Classifier includes one or more illegal characters.

ArgumentNullException

One or more parameters are null.

PeerToPeerException
  • The Default Identity used as the basis of the PeerName could not be retrieved.

  • The PeerName could not be created.

This constructor returns an object of type PeerName that contains the fully qualified name of the peer. It also specifies whether the peer name is secured or unsecured.

This instance uses the default peer identity for the current user and the specified Classifier, in addition to the type of peer name to create with the specified classifier and type.

.NET Framework

Supported in: 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft