XmlPreloadedResolver 类

定义

表示类,其用于通过 DTD 或 XML 流预填充缓存。Represents a class that is used to prepopulate the cache with DTDs or XML streams.

public ref class XmlPreloadedResolver : System::Xml::XmlResolver
public class XmlPreloadedResolver : System.Xml.XmlResolver
type XmlPreloadedResolver = class
    inherit XmlResolver
Public Class XmlPreloadedResolver
Inherits XmlResolver
继承
XmlPreloadedResolver

注解

XmlPreloadedResolver当不需要自动调用网络或不可能时,该类型将用作解析程序。The XmlPreloadedResolver type is used as a resolver when automatic calls to the network are not desired or are not possible. 例如,此类型可用于加载缓存的外部 Dtd。For example, this type can be used for loading cached external DTDs. 或者,你可以使用 XmlPreloadedResolver 预加载在 XHTML 1.0 中定义的已知 dtd。Or, you might use XmlPreloadedResolver to preload well-known DTDs that are defined in XHTML 1.0. 预加载众所周知的 Dtd 不会启动任何网络连接,因为这些 Dtd 已经嵌入到 System.Xml 中。Utils 程序集。Preloading well-known DTDs does not start any network connections because these DTDs are already embedded in the System.Xml.Utils assembly. 当前 XmlPreloadedResolver 包含在 XHTML 1.0 和 RSS 0.91 中定义的 dtd。Currently, XmlPreloadedResolver includes the DTDs that are defined in XHTML 1.0 and RSS 0.91.

构造函数

XmlPreloadedResolver()

初始化 XmlPreloadedResolver 类的新实例。Initializes a new instance of the XmlPreloadedResolver class.

XmlPreloadedResolver(XmlKnownDtds)

用指定的预加载已知 DTD 初始化 XmlPreloadedResolver 类的新实例。Initializes a new instance of the XmlPreloadedResolver class with the specified preloaded well-known DTDs.

XmlPreloadedResolver(XmlResolver)

用指定的回退冲突解决程序初始化 XmlPreloadedResolver 类的新实例。Initializes a new instance of the XmlPreloadedResolver class with the specified fallback resolver.

XmlPreloadedResolver(XmlResolver, XmlKnownDtds)

用指定的回退冲突解决程序和预加载的已知 DTD 初始化 XmlPreloadedResolver 类的新实例。Initializes a new instance of the XmlPreloadedResolver class with the specified fallback resolver and preloaded well-known DTDs.

XmlPreloadedResolver(XmlResolver, XmlKnownDtds, IEqualityComparer<Uri>)

使用指定的回退解析程序、预加载的已知 DTD 以及 URI 相等比较器初始化 XmlPreloadedResolver 类的新实例。Initializes a new instance of the XmlPreloadedResolver class with the specified fallback resolver, preloaded well-known DTDs, and URI equality comparer.

属性

Credentials

设置用于对基础 WebRequest 进行身份验证的凭据。Sets the credentials that are used to authenticate the underlying WebRequest.

PreloadedUris

获取预加载 URI 的集合。Gets a collection of preloaded URIs.

方法

Add(Uri, Byte[])

XmlPreloadedResolver 存储区添加字节数组,并将其映射到 URI。Adds a byte array to the XmlPreloadedResolver store and maps it to a URI. 如果存储区中已包含相同 URI 的映射,将重写现有映射。If the store already contains a mapping for the same URI, the existing mapping is overridden.

Add(Uri, Byte[], Int32, Int32)

XmlPreloadedResolver 存储区添加字节数组,并将其映射到 URI。Adds a byte array to the XmlPreloadedResolver store and maps it to a URI. 如果存储区中已包含相同 URI 的映射,将重写现有映射。If the store already contains a mapping for the same URI, the existing mapping is overridden.

Add(Uri, Stream)

添加 StreamXmlPreloadedResolver 存储区,并将其映射到 URI。Adds a Stream to the XmlPreloadedResolver store and maps it to a URI. 如果存储区中已包含相同 URI 的映射,将重写现有映射。If the store already contains a mapping for the same URI, the existing mapping is overridden.

Add(Uri, String)

将包含预加载数据的字符串添加到 XmlPreloadedResolver,存储并将它映射到一个 URI。Adds a string with preloaded data to the XmlPreloadedResolver store and maps it to a URI. 如果存储区中已包含相同 URI 的映射,将重写现有映射。If the store already contains a mapping for the same URI, the existing mapping is overridden.

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetEntity(Uri, String, Type)

将 URI 映射到包含实际资源的对象。Maps a URI to an object that contains the actual resource.

GetEntityAsync(Uri, String, Type)

将 URI 异步映射到包含实际资源的对象。Asynchronously maps a URI to an object that contains the actual resource.

GetEntityAsync(Uri, String, Type)

将 URI 异步映射到包含实际资源的对象。Asynchronously maps a URI to an object that contains the actual resource.

(继承自 XmlResolver)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Remove(Uri)

XmlPreloadedResolver 中移除与 URI 相对应的数据。Removes the data that corresponds to the URI from the XmlPreloadedResolver.

ResolveUri(Uri, String)

从基 URI 和相对 URI 解析绝对 URI。Resolves the absolute URI from the base and relative URIs.

SupportsType(Uri, Type)

确定解析器是否支持其他的 Type 而不是仅仅支持 StreamDetermines whether the resolver supports other Types than just Stream.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于