PeerName Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
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
Exceptions
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
- 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
.
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.