QueryCorrelationInitializer Class

.NET Framework (current version)
 

Initializes the associated CorrelationHandle based on the results of the MessageQuerySet when the message is sent or received.

Namespace:   System.ServiceModel.Activities
Assembly:  System.ServiceModel.Activities (in System.ServiceModel.Activities.dll)

System.Object
  System.ServiceModel.Activities.CorrelationInitializer
    System.ServiceModel.Activities.QueryCorrelationInitializer

[ContentPropertyAttribute("MessageQuerySet")]
public sealed class QueryCorrelationInitializer : CorrelationInitializer

NameDescription
System_CAPS_pubmethodQueryCorrelationInitializer()

Initializes a new instance of the QueryCorrelationInitializer class.

NameDescription
System_CAPS_pubpropertyCorrelationHandle

Gets or sets the CorrelationHandle argument for the correlation initializer.(Inherited from CorrelationInitializer.)

System_CAPS_pubpropertyMessageQuerySet

Gets or sets the MessageQuerySet that is used to perform the CorrelationKey calculation.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The following example shows how to use the QueryCorrelationInitializer class to set the correlation initialize for a SendReply activity.

new SendReply
{
    DisplayName = "Send Adjusted Cost",
    Request = prescriptionRequest,
    // Initialize the orderHandle using the MessageQuerySet to correlate with the final GetAdjustedCost request
    CorrelationInitializers = 
    {
        new QueryCorrelationInitializer
        {
            CorrelationHandle = orderHandle,
            MessageQuerySet = GetOrderQuerySet
        }
    },
    Content = SendContent.Create(new InArgument<Order>((e) => order.Get(e)))
}

.NET Framework
Available since 4.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: