Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

MessageQuerySet Class

A set of MessageQuery objects and an associated string parameter. A correlation hash (InstanceKey) is computed from the results of the MessageQuery objects as well as the associated strings.

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel.Activities (in System.ServiceModel.Activities.dll)
public class MessageQuerySet : Dictionary<string, MessageQuery>

The MessageQuerySet type exposes the following members.

  NameDescription
Public methodMessageQuerySet()Initializes a new instance of the MessageQuerySet class.
Public methodMessageQuerySet(MessageQueryTable<String>)Initializes a new instance of the MessageQuerySet class with the specified MessageQueryTable<TItem>.
Top
  NameDescription
Public propertyComparerGets the IEqualityComparer<T> that is used to determine equality of keys for the dictionary. (Inherited from Dictionary<TKey, TValue>.)
Public propertyCountGets the number of key/value pairs contained in the Dictionary<TKey, TValue>. (Inherited from Dictionary<TKey, TValue>.)
Public propertyItemGets or sets the value associated with the specified key. (Inherited from Dictionary<TKey, TValue>.)
Public propertyKeysGets a collection containing the keys in the Dictionary<TKey, TValue>. (Inherited from Dictionary<TKey, TValue>.)
Public propertyNameGets or sets the name of the MessageQuerySet instance.
Public propertyValuesGets a collection containing the values in the Dictionary<TKey, TValue>. (Inherited from Dictionary<TKey, TValue>.)
Top
  NameDescription
Public methodAddAdds the specified key and value to the dictionary. (Inherited from Dictionary<TKey, TValue>.)
Public methodClearRemoves all keys and values from the Dictionary<TKey, TValue>. (Inherited from Dictionary<TKey, TValue>.)
Public methodContainsKeyDetermines whether the Dictionary<TKey, TValue> contains the specified key. (Inherited from Dictionary<TKey, TValue>.)
Public methodContainsValueDetermines whether the Dictionary<TKey, TValue> contains a specific value. (Inherited from Dictionary<TKey, TValue>.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetEnumeratorReturns an enumerator that iterates through the Dictionary<TKey, TValue>. (Inherited from Dictionary<TKey, TValue>.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetMessageQueryTableGets the message query table associated with the current MessageQuerySet instance.
Public methodGetObjectDataImplements the System.Runtime.Serialization.ISerializable interface and returns the data needed to serialize the Dictionary<TKey, TValue> instance. (Inherited from Dictionary<TKey, TValue>.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodOnDeserializationImplements the System.Runtime.Serialization.ISerializable interface and raises the deserialization event when the deserialization is complete. (Inherited from Dictionary<TKey, TValue>.)
Public methodRemoveRemoves the value with the specified key from the Dictionary<TKey, TValue>. (Inherited from Dictionary<TKey, TValue>.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodTryGetValueGets the value associated with the specified key. (Inherited from Dictionary<TKey, TValue>.)
Top
  NameDescription
Explicit interface implemetationPrivate methodICollection<KeyValuePair<TKey, TValue>>.AddAdds the specified value to the ICollection<T> with the specified key. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate methodICollection<KeyValuePair<TKey, TValue>>.ContainsDetermines whether the ICollection<T> contains a specific key and value. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate methodICollection<KeyValuePair<TKey, TValue>>.CopyToCopies 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>.)
Explicit interface implemetationPrivate methodICollection.CopyToCopies the elements of the ICollection<T> to an array, starting at the specified array index. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate propertyICollection<KeyValuePair<TKey, TValue>>.IsReadOnlyGets a value indicating whether the dictionary is read-only. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate propertyICollection.IsSynchronizedGets a value indicating whether access to the ICollection is synchronized (thread safe). (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate methodICollection<KeyValuePair<TKey, TValue>>.RemoveRemoves a key and value from the dictionary. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate propertyICollection.SyncRootGets an object that can be used to synchronize access to the ICollection. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate methodIDictionary.AddAdds the specified key and value to the dictionary. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate methodIDictionary.ContainsDetermines whether the IDictionary contains an element with the specified key. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate methodIDictionary.GetEnumeratorReturns an IDictionaryEnumerator for the IDictionary. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate propertyIDictionary.IsFixedSizeGets a value indicating whether the IDictionary has a fixed size. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate propertyIDictionary.IsReadOnlyGets a value indicating whether the IDictionary is read-only. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate propertyIDictionary.ItemGets or sets the value with the specified key. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate propertyIDictionary<TKey, TValue>.KeysGets an ICollection<T> containing the keys of the IDictionary<TKey, TValue>. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate propertyIDictionary.KeysGets an ICollection containing the keys of the IDictionary. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate methodIDictionary.RemoveRemoves the element with the specified key from the IDictionary. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate propertyIDictionary<TKey, TValue>.ValuesGets an ICollection<T> containing the values in the IDictionary<TKey, TValue>. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate propertyIDictionary.ValuesGets an ICollection containing the values in the IDictionary. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate methodIEnumerable<KeyValuePair<TKey, TValue>>.GetEnumeratorReturns an enumerator that iterates through the collection. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorReturns an enumerator that iterates through the collection. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate propertyIReadOnlyDictionary<TKey, TValue>.KeysGets a collection containing the keys of the IReadOnlyDictionary<TKey, TValue>. (Inherited from Dictionary<TKey, TValue>.)
Explicit interface implemetationPrivate propertyIReadOnlyDictionary<TKey, TValue>.ValuesGets a collection containing the values of the IReadOnlyDictionary<TKey, TValue>. (Inherited from Dictionary<TKey, TValue>.)
Top

The 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) }
            }
        }
    }                        
}, 

.NET Framework

Supported in: 4.5.1, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.