編集

次の方法で共有


UriParser.Resolve(Uri, Uri, UriFormatException) Method

Definition

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);
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

Parameters

baseUri
Uri

A base URI.

relativeUri
Uri

A relative URI.

parsingError
UriFormatException

When this method returns, contains the errors that occurred during the resolve process, if any.

Returns

The string of the resolved relative Uri.

Exceptions

baseUri parameter is not an absolute Uri

-or-

baseUri parameter requires user-driven parsing.

Remarks

Uri constructors and Uri.TryCreate use Resolve to construct a URI from baseUri and relativeUri.

If a parsing error occurs, the returned string for the resolved relative Uri is null.

Applies to