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 przeanalizowana.

components
UriComponents

UriComponents do pobrania z uri.

format
UriFormat

Jedna z wartości UriFormat, która kontroluje sposób ucieczki znaków specjalnych.

Zwraca

Ciąg zawierający składniki.

Wyjątki

format jest nieprawidłowa.

-lub-

components nie jest kombinacją prawidłowych wartości UriComponents.

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

Użyj metody GetComponents, 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 zostanie określona Scheme, zostanie ona wyświetlona jako pierwsza.

Dotyczy

Zobacz też