This documentation is archived and is not being maintained.

PeerName.CreateRelativePeerName Method

Creates a new PeerName by replacing the Classifier field defined on the supplied PeerName object with the specified classifier string value.

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

public static PeerName CreateRelativePeerName(
	PeerName peerName,
	string classifier
)

Parameters

peerName
Type: System.Net.PeerToPeer.PeerName

The PeerName object on which to set the new classifier string value.

classifier
Type: System.String

Return Value

Type: System.Net.PeerToPeer.PeerName
The new PeerName object that contains the updated classifier.

ExceptionCondition
ArgumentException

The String provided is not a valid peer name classifier.

ArgumentNullException

The peerName parameter cannot be null.

The Classifier is appended to the existing Authority portion of the PeerName. This string is no more than 149 characters long, including the null terminator. Specify null to return the peer name of the identity.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008

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

.NET Framework

Supported in: 3.5
Show: