PeerName Constructor (String, PeerNameType)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the PeerName class.

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

[SecurityCriticalAttribute]
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.

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