UriParser.GetComponents(Uri, UriComponents, UriFormat) Método
Definición
Obtiene los componentes de un identificador uniforme de recursos URI.Gets the components from a 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
Parámetros
- uri
- Uri
URI que se va a analizar.The URI to parse.
- components
- UriComponents
UriComponents que se va a recuperar de uri
.The UriComponents to retrieve from uri
.
- format
- UriFormat
Uno de los valores UriFormat que controla cómo se utiliza una secuencia de escape para los caracteres especiales.One of the UriFormat values that controls how special characters are escaped.
Devoluciones
Cadena que contiene los componentes.A string that contains the components.
Excepciones
uriFormat
no es válido.uriFormat
is invalid.
o bien-or-
uriComponents
no es una combinación de valores de UriComponents válidos.uriComponents
is not a combination of valid UriComponents values.
uri
requiere un análisis controlado por el usuariouri
requires user-driven parsing
O bien-or-
El parámetro uri
no es un identificador URI absoluto.uri
is not an absolute URI. Los identificadores URI relativos no se pueden utilizar con este método.Relative URIs cannot be used with this method.
Comentarios
Use el método GetComponents para determinar el valor de varias partes del URI, como Scheme, Host o Port.Use the GetComponents method to determine the value of various parts of the URI, such as the Scheme, Host, or Port.
Los componentes se devuelven en el orden en que aparecen en el URI.The components are returned in the order that they appear in the URI. Por ejemplo, si se especifica Scheme, aparecerá en primer lugar.For example, if Scheme is specified, it appears first.