HttpClientChannel.Parse(String, String) Metodo

Definizione

Estrae l'URI del canale e l'URI dell'oggetto noto remoto dall'URL specificato.

public:
 virtual System::String ^ Parse(System::String ^ url, [Runtime::InteropServices::Out] System::String ^ % objectURI);
public string Parse(string url, out string objectURI);
abstract member Parse : string * string -> string
override this.Parse : string * string -> string
Public Function Parse (url As String, ByRef objectURI As String) As String

Parametri

url
String

URL da cui estrarre l'URI dell'oggetto noto remoto.

objectURI
String

Quando termina, questo metodo contiene un oggetto String che contiene l'URI dell'oggetto noto remoto. Questo parametro viene passato non inizializzato.

Valori restituiti

URI del canale corrente o null se l'URL specificato non è un URL HTTP.

Implementazioni

Esempio

Nell'esempio di codice seguente viene illustrato come usare il Parse metodo . Questo esempio di codice fa parte di un esempio più ampio fornito per la HttpClientChannel classe .

// Parse the channel's URI.
String^ objectUrl = L"http://localhost:9090/RemoteObject.rem";
String^ channelUri = clientChannel->Parse( objectUrl,  objectUri );
Console::WriteLine( L"The object URL is {0}.", objectUrl );
Console::WriteLine( L"The object URI is {0}.", objectUri );
Console::WriteLine( L"The channel URI is {0}.", channelUri );
// Parse the channel's URI.
string objectUrl = "http://localhost:9090/RemoteObject.rem";
string channelUri = clientChannel.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);

Si applica a

Vedi anche