TcpChannel.Parse(String, String) Method

Definition

Extracts the channel URI and the remote well-known object URI from the specified URL.

C#
public string Parse(string url, out string objectURI);

Parameters

url
String

The URL from which to extract the URI of the remote well-known object.

objectURI
String

When this method returns, contains a String that holds the URI of the remote well-known object. This parameter is passed uninitialized.

Returns

The URI of the current channel.

Implements

Examples

The following code example shows how to use this method.

C#
// Parse the channel's URI.
string[] urls = serverChannel.GetUrlsForUri("RemoteObject.rem");
if (urls.Length > 0)
{
    string objectUrl = urls[0];
    string objectUri;
    string channelUri = serverChannel.Parse(objectUrl, out objectUri);
    Console.WriteLine("The object URL is {0}.", objectUrl);
    Console.WriteLine("The object URI is {0}.", objectUri);
    Console.WriteLine("The channel URI is {0}.", channelUri);
}

Remarks

A URI of an object is a value that uniquely identifies a specific object instance.

Applies to

Tuote Versiot
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also