Breyta

Deila með


PeerName Constructors

Definition

Initializes a new instance of the PeerName class.

Overloads

PeerName(String)

Initializes a new object of type PeerName with the supplied fully qualified peer name String value.

PeerName(SerializationInfo, StreamingContext)

Populates a SerializationInfo object with the data needed to serialize the PeerName.

PeerName(String, PeerNameType)

Initializes a new instance of the PeerName class.

PeerName(String)

Initializes a new object of type PeerName with the supplied fully qualified peer name String value.

public:
 PeerName(System::String ^ remotePeerName);
public PeerName (string remotePeerName);
new System.Net.PeerToPeer.PeerName : string -> System.Net.PeerToPeer.PeerName
Public Sub New (remotePeerName As String)

Parameters

remotePeerName
String

Contains the peer name to encode as a PeerName instance.

Exceptions

The String provided is not a valid PeerName.

remotePeerName is null.

See also

Applies to

PeerName(SerializationInfo, StreamingContext)

Populates a SerializationInfo object with the data needed to serialize the PeerName.

protected:
 PeerName(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected PeerName (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Net.PeerToPeer.PeerName : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.PeerToPeer.PeerName
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

Reference to the object that holds the data needed to deserialize this instance.

context
StreamingContext

Context that provides the means for deserializing the data. Also referred to as the source of the serialized data.

Exceptions

One or more parameters are null.

Remarks

This constructor is required for deserialization of this type.

See also

Applies to

PeerName(String, PeerNameType)

Initializes a new instance of the PeerName class.

public:
 PeerName(System::String ^ classifier, System::Net::PeerToPeer::PeerNameType peerNameType);
[System.Security.SecurityCritical]
public PeerName (string classifier, System.Net.PeerToPeer.PeerNameType peerNameType);
[<System.Security.SecurityCritical>]
new System.Net.PeerToPeer.PeerName : string * System.Net.PeerToPeer.PeerNameType -> System.Net.PeerToPeer.PeerName
Public Sub New (classifier As String, peerNameType As PeerNameType)

Parameters

classifier
String

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

peerNameType
PeerNameType

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

Attributes

Exceptions

The Classifier includes one or more illegal characters.

One or more parameters are null.

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

  • The PeerName could not be created.

Remarks

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.

See also

Applies to