Поделиться через


XmlResolver.ResolveUri Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

When overridden in a derived class, resolves the absolute URI from the base and relative URIs.

Namespace:  System.Xml
Assembly:  System.Xml (in System.Xml.dll)

Syntax

'Declaration
Public Overridable Function ResolveUri ( _
    baseUri As Uri, _
    relativeUri As String _
) As Uri
public virtual Uri ResolveUri(
    Uri baseUri,
    string relativeUri
)

Parameters

  • baseUri
    Type: System.Uri
    The base URI used to resolve the relative URI
  • relativeUri
    Type: System.String
    The URI to resolve. The URI can be absolute or relative. If absolute, this value effectively replaces the baseUri value. If relative, it combines with the baseUri to make an absolute URI.

Return Value

Type: System.Uri
A Uri representing the absolute URI or nulla null reference (Nothing in Visual Basic) if the relative URI cannot be resolved.

Exceptions

Exception Condition
ArgumentException

relativeUri is nulla null reference (Nothing in Visual Basic)

Remarks

The absolute URI may be used as the base URI for any subsequent requests for entities that are relative to this URI.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.