XmlBinaryReaderSession 类
定义
允许以动态方式管理经过优化的字符串。Enables optimized strings to be managed in a dynamic way.
public ref class XmlBinaryReaderSession : System::Xml::IXmlDictionary
public class XmlBinaryReaderSession : System.Xml.IXmlDictionary
type XmlBinaryReaderSession = class
interface IXmlDictionary
Public Class XmlBinaryReaderSession
Implements IXmlDictionary
- 继承
-
XmlBinaryReaderSession
- 实现
注解
会话对象(此类和 XmlBinaryWriterSession 一起)启用可以跨越整个会话的动态字符串原子化。Session objects (this class together with XmlBinaryWriterSession) enable dynamic string atomization that can span an entire conversation. 这些会话对象管理 XmlDictionaryString 实例的动态字典。These session objects manage dynamic dictionaries of XmlDictionaryString instances. 有关动态字典的更多信息,请参见 XmlDictionary。For more information about dynamic dictionaries see XmlDictionary.
由于可以异步处理,同步到达的消息可以按不同于消息发送的顺序进行处理。Due to asynchronous processing, it is possible for messages that arrive synchronously to be processed in a different order than they order in which they were sent. 跨越消息的字符串原子化必须确保按原始顺序处理消息,或者必须使用其他机制传达原子化字符串。String atomization that spans messages must ensure the messages are processed in the original order, or the atomized strings must be conveyed using a different mechanism.
要使用动态字典,请创建会话对象并将其传递到二进制 XML 读取器或编写器的构造函数或初始值设定项。To use them you create a session object and pass it to the constructor or initializer for a binary XML reader or writer.
要重新使用动态字典,只需将同一会话对象传递到所有后续读取器和/或编写器即可。To reuse a dynamic dictionary simply pass the same session object to all subsequent readers and/or writers.
构造函数
| XmlBinaryReaderSession() |
初始化 XmlBinaryReaderSession 类的新实例。Initializes a new instance of the XmlBinaryReaderSession class. |
方法
| Add(Int32, String) |
从输入参数创建一个 XmlDictionaryString 并将其添加到内部集合。Creates an XmlDictionaryString from the input parameters and adds it to an internal collection. |
| Clear() |
清除所有内容的内部集合。Clears the internal collection of all contents. |
| Equals(Object) |
确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
| GetHashCode() |
作为默认哈希函数。Serves as the default hash function. (继承自 Object) |
| GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
| MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
| ToString() |
返回表示当前对象的字符串。Returns a string that represents the current object. (继承自 Object) |
| TryLookup(Int32, XmlDictionaryString) |
检查内部集合是否包含与键匹配的项。Checks whether the internal collection contains an entry matching a key. |
| TryLookup(String, XmlDictionaryString) |
检查内部集合是否包含与值匹配的项。Checks whether the internal collection contains an entry matching a value. |
| TryLookup(XmlDictionaryString, XmlDictionaryString) |
检查内部集合是否包含与值匹配的项。Checks whether the internal collection contains an entry matching a value. |