XmlDictionary XmlDictionary XmlDictionary XmlDictionary Class

定义

实现用于优化 Windows Communication Foundation (WCF) 的 XML 读取器/编写器实现的字典。Implements a dictionary used to optimize Windows Communication Foundation (WCF)'s XML reader/writer implementations.

public ref class XmlDictionary : System::Xml::IXmlDictionary
public class XmlDictionary : System.Xml.IXmlDictionary
type XmlDictionary = class
    interface IXmlDictionary
Public Class XmlDictionary
Implements IXmlDictionary
继承
XmlDictionaryXmlDictionaryXmlDictionaryXmlDictionary
实现

注解

字典在常见文本字符串和整数之间建立映射,并为压缩和解压缩 XML 提供一种有效的机制。Dictionaries establish a mapping between commonly appearing text strings, and integers, and provide an effective mechanism for compressing and decompressing XML. Windows Communication Foundation (WCF)使用两种字典:静态和动态。Windows Communication Foundation (WCF) uses 2 kinds of dictionaries, static and dynamic.

使用静态字典时,通信的两端都使用预定义的字典。With static dictionaries, both sides of the communication use a predefined dictionary.

使用动态字典时,发送端可以添加其映射不在静态字典中的新字符串。With dynamic dictionaries, the sending side can add new strings and their mappings not already in the static dictionary. 动态字典与消息一起在带外发送。Dynamic dictionaries are sent out of band with the message. 动态字典使用 XmlBinaryWriterSessionXmlBinaryReaderSession 类传输消息和映射。Dynamic dictionaries use the XmlBinaryWriterSession and XmlBinaryReaderSession classes to transmit messages and mappings.

构造函数

XmlDictionary() XmlDictionary() XmlDictionary() XmlDictionary()

创建一个空的 XmlDictionaryCreates an empty XmlDictionary.

XmlDictionary(Int32) XmlDictionary(Int32) XmlDictionary(Int32) XmlDictionary(Int32)

创建具有初始容量的 XmlDictionaryCreates a XmlDictionary with an initial capacity.

属性

Empty Empty Empty Empty

获取 staticIXmlDictionaryGets a static empty IXmlDictionary.

方法

Add(String) Add(String) Add(String) Add(String)

将字符串添加到 XmlDictionaryAdds a string to the XmlDictionary.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

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

(Inherited from Object)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

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

(Inherited from Object)
ToString() ToString() ToString() ToString()

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

(Inherited from Object)
TryLookup(Int32, XmlDictionaryString) TryLookup(Int32, XmlDictionaryString) TryLookup(Int32, XmlDictionaryString) TryLookup(Int32, XmlDictionaryString)

尝试在字典中查找项。Attempts to look up an entry in the dictionary.

TryLookup(String, XmlDictionaryString) TryLookup(String, XmlDictionaryString) TryLookup(String, XmlDictionaryString) TryLookup(String, XmlDictionaryString)

检查字典中是否有指定的字符串值。Checks the dictionary for a specified string value.

TryLookup(XmlDictionaryString, XmlDictionaryString) TryLookup(XmlDictionaryString, XmlDictionaryString) TryLookup(XmlDictionaryString, XmlDictionaryString) TryLookup(XmlDictionaryString, XmlDictionaryString)

检查字典中是否有指定的 XmlDictionaryStringChecks the dictionary for a specified XmlDictionaryString.

适用于