mscorlib(4.0.0.0) API with additions
System.Xml.XmlResolver Class Referenceabstract

Resolves external XML resources named by a Uniform Resource Identifier (URI). More...

Inheritance diagram for System.Xml.XmlResolver:
[legend]

Public Member Functions

abstract object GetEntity (Uri absoluteUri, string role, Type ofObjectToReturn)
 When overridden in a derived class, maps a URI to an object that contains the actual resource. More...
 
virtual Uri ResolveUri (Uri baseUri, string relativeUri)
 When overridden in a derived class, resolves the absolute URI from the base and relative URIs. More...
 
virtual bool SupportsType (Uri absoluteUri, Type type)
 Enables the resolver to return types other than T:System.IO.Stream. More...
 
virtual Task< object > GetEntityAsync (Uri absoluteUri, string role, Type ofObjectToReturn)
 Asynchronously maps a URI to an object that contains the actual resource. More...
 

Properties

virtual ICredentials Credentials [set]
 When overridden in a derived class, sets the credentials used to authenticate web requests. More...
 

Detailed Description

Resolves external XML resources named by a Uniform Resource Identifier (URI).

Definition at line 8 of file XmlResolver.cs.

Member Function Documentation

◆ GetEntity()

abstract object System.Xml.XmlResolver.GetEntity ( Uri  absoluteUri,
string  role,
Type  ofObjectToReturn 
)
pure virtual

When overridden in a derived class, maps a URI to an object that contains the actual resource.

Parameters
absoluteUriThe URI returned from M:System.Xml.XmlResolver.ResolveUri(System.Uri,System.String).
roleCurrently not used.
ofObjectToReturnThe type of object to return. The current version only returns System.IO.Stream objects.
Returns
A stream object or null if a type other than stream is specified.
Exceptions
T:System.Xml.XmlExceptionofObjectToReturn is not a Stream type.
T:System.UriFormatExceptionThe specified URI is not an absolute URI.
T:System.ArgumentNullExceptionabsoluteUri is null.
T:System.ExceptionThere is a runtime error (for example, an interrupted server connection).

Implemented in System.Xml.Resolvers.XmlPreloadedResolver, System.Xml.XmlSecureResolver, System.Xml.XmlUrlResolver, and System.Xml.XmlXapResolver.

◆ GetEntityAsync()

virtual Task<object> System.Xml.XmlResolver.GetEntityAsync ( Uri  absoluteUri,
string  role,
Type  ofObjectToReturn 
)
virtual

Asynchronously maps a URI to an object that contains the actual resource.

Parameters
absoluteUriThe URI returned from M:System.Xml.XmlResolver.ResolveUri(System.Uri,System.String).
roleCurrently not used.
ofObjectToReturnThe type of object to return. The current version only returns T:System.IO.Stream objects.
Returns
A stream object or null if a type other than stream is specified.

Reimplemented in System.Xml.Resolvers.XmlPreloadedResolver, System.Xml.XmlSecureResolver, and System.Xml.XmlUrlResolver.

Definition at line 83 of file XmlResolver.cs.

◆ ResolveUri()

virtual Uri System.Xml.XmlResolver.ResolveUri ( Uri  baseUri,
string  relativeUri 
)
virtual

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

Parameters
baseUriThe base URI used to resolve the relative URI.
relativeUriThe 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.
Returns
The absolute URI or null if the relative URI cannot be resolved.
Exceptions
T:System.ArgumentExceptionrelativeUri is null.

Reimplemented in System.Xml.Resolvers.XmlPreloadedResolver, System.Xml.XmlSecureResolver, and System.Xml.XmlUrlResolver.

Definition at line 38 of file XmlResolver.cs.

◆ SupportsType()

virtual bool System.Xml.XmlResolver.SupportsType ( Uri  absoluteUri,
Type  type 
)
virtual

Enables the resolver to return types other than T:System.IO.Stream.

Parameters
absoluteUriThe URI.
typeThe type to return.
Returns
true if the type is supported; otherwise, false.

Reimplemented in System.Xml.Resolvers.XmlPreloadedResolver.

Definition at line 65 of file XmlResolver.cs.

Property Documentation

◆ Credentials

virtual ICredentials System.Xml.XmlResolver.Credentials
set

When overridden in a derived class, sets the credentials used to authenticate web requests.

Returns
The credentials to be used to authenticate web requests. If this property is not set, the value defaults to null; that is, the XmlResolver has no user credentials.

Definition at line 13 of file XmlResolver.cs.


The documentation for this class was generated from the following file: