UriParser.Resolve(Uri, Uri, UriFormatException) UriParser.Resolve(Uri, Uri, UriFormatException) UriParser.Resolve(Uri, Uri, UriFormatException) UriParser.Resolve(Uri, Uri, UriFormatException) Method

定义

Uri 构造函数和 TryCreate 调用以解析相对 URI。Called by Uri constructors and TryCreate to resolve a relative URI.

protected:
 virtual System::String ^ Resolve(Uri ^ baseUri, Uri ^ relativeUri, [Runtime::InteropServices::Out] UriFormatException ^ % parsingError);
protected virtual string Resolve (Uri baseUri, Uri relativeUri, out UriFormatException parsingError);
abstract member Resolve : Uri * Uri * UriFormatException -> string
override this.Resolve : Uri * Uri * UriFormatException -> string
Protected Overridable Function Resolve (baseUri As Uri, relativeUri As Uri, ByRef parsingError As UriFormatException) As String

参数

baseUri
Uri Uri Uri Uri

一个基 URI。A base URI.

relativeUri
Uri Uri Uri Uri

一个相对 URI。A relative URI.

parsingError
UriFormatException UriFormatException UriFormatException UriFormatException

解析过程中的错误(如果有)。Errors during the resolve process, if any.

返回

经过解析的相对 Uri 的字符串。The string of the resolved relative Uri.

异常

baseUri 参数不是绝对 UribaseUri parameter is not an absolute Uri

- 或 --or- baseUri 参数需要用户驱动的分析。baseUri parameter requires user-driven parsing.

注解

Uri构造函数Uri.TryCreateResolve用于从baseUrirelativeUri构造 URI。Uri constructors and Uri.TryCreate use Resolve to construct a URI from baseUri and relativeUri.

如果发生分析错误,则解析的相对Uri返回的字符串为 null。If a parsing error occurs, the returned string for the resolved relative Uri is null.

适用于