UriParser.GetComponents(Uri, UriComponents, UriFormat) Metoda

Definicja

Pobiera składniki z identyfikatora URI.

protected:
 virtual System::String ^ GetComponents(Uri ^ uri, UriComponents components, UriFormat format);
protected virtual string GetComponents (Uri uri, UriComponents components, UriFormat format);
abstract member GetComponents : Uri * UriComponents * UriFormat -> string
override this.GetComponents : Uri * UriComponents * UriFormat -> string
Protected Overridable Function GetComponents (uri As Uri, components As UriComponents, format As UriFormat) As String

Parametry

uri
Uri

Identyfikator URI do analizy.

components
UriComponents

Element UriComponents do pobrania z urielementu .

format
UriFormat

UriFormat Jedna z wartości, które sterują sposobem ucieczki znaków specjalnych.

Zwraca

String

Ciąg zawierający składniki.

Wyjątki

uriFormat jest nieprawidłowy.

-lub- uriComponents nie jest kombinacją prawidłowych UriComponents wartości.

uri wymaga analizowania opartego na użytkowniku -lub- uri nie jest bezwzględnym identyfikatorem URI. Względne identyfikatory URI nie mogą być używane z tą metodą.

Uwagi

GetComponents Użyj metody , aby określić wartość różnych części identyfikatora URI, takich jak Scheme, Hostlub Port.

Składniki są zwracane w kolejności, w której są wyświetlane w identyfikatorze URI. Jeśli na przykład Scheme zostanie określony, zostanie wyświetlony jako pierwszy.

Dotyczy

Zobacz też