MessageQuerySet MessageQuerySet MessageQuerySet MessageQuerySet Class

定义

一组 MessageQuery 对象和一个关联的字符串参数。A set of MessageQuery objects and an associated string parameter. 相关哈希 (InstanceKey) 是从 MessageQuery 对象的结果以及关联字符串计算出的。A correlation hash (InstanceKey) is computed from the results of the MessageQuery objects as well as the associated strings.

public ref class MessageQuerySet : System::Collections::Generic::Dictionary<System::String ^, System::ServiceModel::Dispatcher::MessageQuery ^>
public class MessageQuerySet : System.Collections.Generic.Dictionary<string,System.ServiceModel.Dispatcher.MessageQuery>
type MessageQuerySet = class
    inherit Dictionary<string, MessageQuery>
Public Class MessageQuerySet
Inherits Dictionary(Of String, MessageQuery)
继承

示例

下面的示例演示如何在 MessageQuerySet 活动内的 QueryCorrelationInitializer 中创建 SendReplyThe following example shows how to create a MessageQuerySet in a QueryCorrelationInitializer within a SendReply activity.

new SendReply
{
    Request = submitPO,
    Content = SendContent.Create(new InArgument<int>( (e) => po.Get(e).Id)), // creates a SendMessageContent
    CorrelationInitializers =
    {
        new QueryCorrelationInitializer
        {
            // initializes a correlation based on the PurchaseOrder Id sent in the reply message and stores it in the handle
            CorrelationHandle = poidHandle,
            MessageQuerySet = new MessageQuerySet
            {
                // int is the name of the parameter being sent in the outgoing response
                { "PoId", new XPathMessageQuery("sm:body()/ser:int", Constants.XPathMessageContext) }
            }
        }
    }                        
}, 

构造函数

MessageQuerySet() MessageQuerySet() MessageQuerySet() MessageQuerySet()

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

MessageQuerySet(MessageQueryTable<String>) MessageQuerySet(MessageQueryTable<String>) MessageQuerySet(MessageQueryTable<String>) MessageQuerySet(MessageQueryTable<String>)

使用指定的 MessageQuerySet 初始化 MessageQueryTable<TItem> 类的新实例。Initializes a new instance of the MessageQuerySet class with the specified MessageQueryTable<TItem>.

属性

Comparer Comparer Comparer Comparer

获取用于确定字典中的键是否相等的 IEqualityComparer<T>Gets the IEqualityComparer<T> that is used to determine equality of keys for the dictionary.

(Inherited from Dictionary<TKey,TValue>)
Count Count Count Count

获取包含在 Dictionary<TKey,TValue> 中的键/值对的数目。Gets the number of key/value pairs contained in the Dictionary<TKey,TValue>.

(Inherited from Dictionary<TKey,TValue>)
ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

获取一个值,该值指示对 ICollection 的访问是否同步(线程安全)。Gets a value that indicates whether access to the ICollection is synchronized (thread safe).

(Inherited from Dictionary<TKey,TValue>)
ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

获取可用于同步对 ICollection 的访问的对象。Gets an object that can be used to synchronize access to the ICollection.

(Inherited from Dictionary<TKey,TValue>)
ICollection<KeyValuePair<TKey,TValue>>.IsReadOnly ICollection<KeyValuePair<TKey,TValue>>.IsReadOnly ICollection<KeyValuePair<TKey,TValue>>.IsReadOnly ICollection<KeyValuePair<TKey,TValue>>.IsReadOnly

获取一个值,该值指示字典是否为只读。Gets a value that indicates whether the dictionary is read-only.

(Inherited from Dictionary<TKey,TValue>)
IDictionary.IsFixedSize IDictionary.IsFixedSize IDictionary.IsFixedSize IDictionary.IsFixedSize

获取一个值,该值指示 IDictionary 是否具有固定大小。Gets a value that indicates whether the IDictionary has a fixed size.

(Inherited from Dictionary<TKey,TValue>)
IDictionary.IsReadOnly IDictionary.IsReadOnly IDictionary.IsReadOnly IDictionary.IsReadOnly

获取一个值,该值指示 IDictionary 是否为只读。Gets a value that indicates whether the IDictionary is read-only.

(Inherited from Dictionary<TKey,TValue>)
IDictionary.Item[Object] IDictionary.Item[Object] IDictionary.Item[Object] IDictionary.Item[Object]

获取或设置具有指定键的值。Gets or sets the value with the specified key.

(Inherited from Dictionary<TKey,TValue>)
IDictionary.Keys IDictionary.Keys IDictionary.Keys IDictionary.Keys

获取包含 ICollection 的键的 IDictionaryGets an ICollection containing the keys of the IDictionary.

(Inherited from Dictionary<TKey,TValue>)
IDictionary.Values IDictionary.Values IDictionary.Values IDictionary.Values

获取一个 ICollection,它包含 IDictionary 中的值。Gets an ICollection containing the values in the IDictionary.

(Inherited from Dictionary<TKey,TValue>)
IDictionary<TKey,TValue>.Keys IDictionary<TKey,TValue>.Keys IDictionary<TKey,TValue>.Keys IDictionary<TKey,TValue>.Keys

获取包含 ICollection<T> 的键的 IDictionary<TKey,TValue>Gets an ICollection<T> containing the keys of the IDictionary<TKey,TValue>.

(Inherited from Dictionary<TKey,TValue>)
IDictionary<TKey,TValue>.Values IDictionary<TKey,TValue>.Values IDictionary<TKey,TValue>.Values IDictionary<TKey,TValue>.Values

获取一个 ICollection<T>,它包含 IDictionary<TKey,TValue> 中的值。Gets an ICollection<T> containing the values in the IDictionary<TKey,TValue>.

(Inherited from Dictionary<TKey,TValue>)
IReadOnlyDictionary<TKey,TValue>.Keys IReadOnlyDictionary<TKey,TValue>.Keys IReadOnlyDictionary<TKey,TValue>.Keys IReadOnlyDictionary<TKey,TValue>.Keys

获取包含 IReadOnlyDictionary<TKey,TValue> 的键的集合。Gets a collection containing the keys of the IReadOnlyDictionary<TKey,TValue>.

(Inherited from Dictionary<TKey,TValue>)
IReadOnlyDictionary<TKey,TValue>.Values IReadOnlyDictionary<TKey,TValue>.Values IReadOnlyDictionary<TKey,TValue>.Values IReadOnlyDictionary<TKey,TValue>.Values

获取包含 IReadOnlyDictionary<TKey,TValue> 的值的集合。Gets a collection containing the values of the IReadOnlyDictionary<TKey,TValue>.

(Inherited from Dictionary<TKey,TValue>)
Item[TKey] Item[TKey] Item[TKey] Item[TKey]

获取或设置与指定的键关联的值。Gets or sets the value associated with the specified key.

(Inherited from Dictionary<TKey,TValue>)
Keys Keys Keys Keys

获取包含 Dictionary<TKey,TValue> 中的键的集合。Gets a collection containing the keys in the Dictionary<TKey,TValue>.

(Inherited from Dictionary<TKey,TValue>)
Name Name Name Name

获取或设置 MessageQuerySet 实例的名称。Gets or sets the name of the MessageQuerySet instance.

Values Values Values Values

获取包含 Dictionary<TKey,TValue> 中的值的集合。Gets a collection containing the values in the Dictionary<TKey,TValue>.

(Inherited from Dictionary<TKey,TValue>)

方法

Add(TKey, TValue) Add(TKey, TValue) Add(TKey, TValue) Add(TKey, TValue)

将指定的键和值添加到字典中。Adds the specified key and value to the dictionary.

(Inherited from Dictionary<TKey,TValue>)
Clear() Clear() Clear() Clear()

将所有键和值从 Dictionary<TKey,TValue> 中移除。Removes all keys and values from the Dictionary<TKey,TValue>.

(Inherited from Dictionary<TKey,TValue>)
ContainsKey(TKey) ContainsKey(TKey) ContainsKey(TKey) ContainsKey(TKey)

确定是否 Dictionary<TKey,TValue> 包含指定键。Determines whether the Dictionary<TKey,TValue> contains the specified key.

(Inherited from Dictionary<TKey,TValue>)
ContainsValue(TValue) ContainsValue(TValue) ContainsValue(TValue) ContainsValue(TValue)

确定 Dictionary<TKey,TValue> 是否包含特定值。Determines whether the Dictionary<TKey,TValue> contains a specific value.

(Inherited from Dictionary<TKey,TValue>)
EnsureCapacity(Int32) EnsureCapacity(Int32) EnsureCapacity(Int32) EnsureCapacity(Int32)

确保字典可容纳指定数量的条目,而无需进一步扩展其后备存储器。Ensures that the dictionary can hold up to a specified number of entries without any further expansion of its backing storage.

(Inherited from Dictionary<TKey,TValue>)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

返回循环访问 Dictionary<TKey,TValue> 的枚举数。Returns an enumerator that iterates through the Dictionary<TKey,TValue>.

(Inherited from Dictionary<TKey,TValue>)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

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

(Inherited from Object)
GetMessageQueryTable() GetMessageQueryTable() GetMessageQueryTable() GetMessageQueryTable()

获取与当前的 MessageQuerySet 实例关联的消息查询表。Gets the message query table associated with the current MessageQuerySet instance.

GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext)

实现 ISerializable 接口,并返回序列化 Dictionary<TKey,TValue> 实例所需的数据。Implements the ISerializable interface and returns the data needed to serialize the Dictionary<TKey,TValue> instance.

(Inherited from Dictionary<TKey,TValue>)
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)
OnDeserialization(Object) OnDeserialization(Object) OnDeserialization(Object) OnDeserialization(Object)

实现 ISerializable 接口,并在完成反序列化之后引发反序列化事件。Implements the ISerializable interface and raises the deserialization event when the deserialization is complete.

(Inherited from Dictionary<TKey,TValue>)
Remove(TKey) Remove(TKey) Remove(TKey) Remove(TKey)

Dictionary<TKey,TValue> 中移除所指定的键的值。Removes the value with the specified key from the Dictionary<TKey,TValue>.

(Inherited from Dictionary<TKey,TValue>)
Remove(TKey, TValue) Remove(TKey, TValue) Remove(TKey, TValue) Remove(TKey, TValue) Inherited from Dictionary<TKey,TValue>
ToString() ToString() ToString() ToString()

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

(Inherited from Object)
TrimExcess() TrimExcess() TrimExcess() TrimExcess()

如果最初已使用此字典中的所有条目对此字典进行了初始化,则将此字典的容量设置为所需容量。Sets the capacity of this dictionary to what it would be if it had been originally initialized with all its entries.

(Inherited from Dictionary<TKey,TValue>)
TrimExcess(Int32) TrimExcess(Int32) TrimExcess(Int32) TrimExcess(Int32)

设置此字典的容量,使其可容纳指定数量的条目,而无需进一步扩展其后备存储器。Sets the capacity of this dictionary to hold up a specified number of entries without any further expansion of its backing storage.

(Inherited from Dictionary<TKey,TValue>)
TryAdd(TKey, TValue) TryAdd(TKey, TValue) TryAdd(TKey, TValue) TryAdd(TKey, TValue)

尝试将指定的键和值添加到字典中。Attempts to add the specified key and value to the dictionary.

(Inherited from Dictionary<TKey,TValue>)
TryGetValue(TKey, TValue) TryGetValue(TKey, TValue) TryGetValue(TKey, TValue) TryGetValue(TKey, TValue)

获取与指定键关联的值。Gets the value associated with the specified key.

(Inherited from Dictionary<TKey,TValue>)

显式界面实现

ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)

从指定的数组索引开始,将 ICollection<T> 中的元素复制到一个数组中。Copies the elements of the ICollection<T> to an array, starting at the specified array index.

(Inherited from Dictionary<TKey,TValue>)
ICollection<KeyValuePair<TKey,TValue>>.Add(KeyValuePair<TKey,TValue>) ICollection<KeyValuePair<TKey,TValue>>.Add(KeyValuePair<TKey,TValue>) ICollection<KeyValuePair<TKey,TValue>>.Add(KeyValuePair<TKey,TValue>) ICollection<KeyValuePair<TKey,TValue>>.Add(KeyValuePair<TKey,TValue>)

添加指定值到带有指定键的 ICollection<T>Adds the specified value to the ICollection<T> with the specified key.

(Inherited from Dictionary<TKey,TValue>)
ICollection<KeyValuePair<TKey,TValue>>.Contains(KeyValuePair<TKey,TValue>) ICollection<KeyValuePair<TKey,TValue>>.Contains(KeyValuePair<TKey,TValue>) ICollection<KeyValuePair<TKey,TValue>>.Contains(KeyValuePair<TKey,TValue>) ICollection<KeyValuePair<TKey,TValue>>.Contains(KeyValuePair<TKey,TValue>)

确定是否 ICollection<T> 包含一个指定键和值。Determines whether the ICollection<T> contains a specific key and value.

(Inherited from Dictionary<TKey,TValue>)
ICollection<KeyValuePair<TKey,TValue>>.CopyTo(KeyValuePair<TKey,TValue>[], Int32) ICollection<KeyValuePair<TKey,TValue>>.CopyTo(KeyValuePair<TKey,TValue>[], Int32) ICollection<KeyValuePair<TKey,TValue>>.CopyTo(KeyValuePair<TKey,TValue>[], Int32) ICollection<KeyValuePair<TKey,TValue>>.CopyTo(KeyValuePair<TKey,TValue>[], Int32)

从特定的数组索引处开始,将 ICollection<T> 的元素复制到类型 KeyValuePair<TKey,TValue> 的一个数组。Copies the elements of the ICollection<T> to an array of type KeyValuePair<TKey,TValue>, starting at the specified array index.

(Inherited from Dictionary<TKey,TValue>)
ICollection<KeyValuePair<TKey,TValue>>.Remove(KeyValuePair<TKey,TValue>) ICollection<KeyValuePair<TKey,TValue>>.Remove(KeyValuePair<TKey,TValue>) ICollection<KeyValuePair<TKey,TValue>>.Remove(KeyValuePair<TKey,TValue>) ICollection<KeyValuePair<TKey,TValue>>.Remove(KeyValuePair<TKey,TValue>)

从字典中移除键和值。Removes a key and value from the dictionary.

(Inherited from Dictionary<TKey,TValue>)
IDictionary.Add(Object, Object) IDictionary.Add(Object, Object) IDictionary.Add(Object, Object) IDictionary.Add(Object, Object)

将指定的键和值添加到字典中。Adds the specified key and value to the dictionary.

(Inherited from Dictionary<TKey,TValue>)
IDictionary.Contains(Object) IDictionary.Contains(Object) IDictionary.Contains(Object) IDictionary.Contains(Object)

确定是否 IDictionary 包含带有指定键的元素。Determines whether the IDictionary contains an element with the specified key.

(Inherited from Dictionary<TKey,TValue>)
IDictionary.GetEnumerator() IDictionary.GetEnumerator() IDictionary.GetEnumerator() IDictionary.GetEnumerator()

返回 IDictionaryEnumeratorIDictionaryReturns an IDictionaryEnumerator for the IDictionary.

(Inherited from Dictionary<TKey,TValue>)
IDictionary.Remove(Object) IDictionary.Remove(Object) IDictionary.Remove(Object) IDictionary.Remove(Object)

IDictionary 中移除包含指定键的元素。Removes the element with the specified key from the IDictionary.

(Inherited from Dictionary<TKey,TValue>)
IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

返回一个循环访问集合的枚举器。Returns an enumerator that iterates through the collection.

(Inherited from Dictionary<TKey,TValue>)
IEnumerable<KeyValuePair<TKey,TValue>>.GetEnumerator() IEnumerable<KeyValuePair<TKey,TValue>>.GetEnumerator() IEnumerable<KeyValuePair<TKey,TValue>>.GetEnumerator() IEnumerable<KeyValuePair<TKey,TValue>>.GetEnumerator()

返回一个循环访问集合的枚举器。Returns an enumerator that iterates through the collection.

(Inherited from Dictionary<TKey,TValue>)

扩展方法

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>)

在给定其泛型参数 TDataTable 的输入 DataRow 对象的情况下,返回包含 IEnumerable<T> 对象副本的 DataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个节点的上级。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个节点的上级。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子代节点的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>)

返回源集合中每个元素和文档的子元素的集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName)

返回源集合中经过筛选的每个元素和文档的子元素集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>)

返回节点集合(其中包含源集合中的所有节点),并按文档顺序排列。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子节点集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

将源集合中的每个节点从其父节点中移除。Removes every node in the source collection from its parent node.

适用于