Class CorrelationFilter
- Namespace
- Microsoft.ServiceBus.Messaging
- Assembly
- Microsoft.ServiceBus.dll
Represents the correlation filter expression.
[DataContract(Name = "CorrelationFilter", Namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect")]
[KnownType(typeof(DateTimeOffset))]
public sealed class CorrelationFilter : Filter, IExtensibleDataObject
- Inheritance
-
CorrelationFilter
- Implements
-
IExtensibleDataObject
- Inherited Members
Remarks
The CorrelationFilter provides an efficient shortcut for declarations of filters that deal only with correlation equality.
In this case the cost of the lexigraphical analysis of the expression can be avoided.
Not only will correlation filters be optimized at declaration time, but they will also be optimized at runtime.
Correlation filter matching can be reduced to a hashtable lookup, which aggregates the complexity of the set of defined correlation filters to O(1).
Constructors
CorrelationFilter()
Initializes a new instance of the CorrelationFilter class with default values.
public CorrelationFilter()
CorrelationFilter(string)
Initializes a new instance of the CorrelationFilter class with the specified correlation identifier.
public CorrelationFilter(string correlationId)
Parameters
correlationId
stringThe identifier for the correlation.
Exceptions
- ArgumentException
Thrown when the
correlationId
is null or empty.
Properties
ContentType
Gets the content type of the message.
[DataMember(Name = "ContentType", Order = 131079, EmitDefaultValue = false, IsRequired = false)]
public string ContentType { get; set; }
Property Value
- string
The content type of the message.
CorrelationId
Gets the identifier of the correlation.
[DataMember(Name = "CorrelationId", Order = 65537, EmitDefaultValue = false, IsRequired = false)]
public string CorrelationId { get; set; }
Property Value
- string
The identifier of the correlation.
Label
Gets the application specific label.
[DataMember(Name = "Label", Order = 131076, EmitDefaultValue = false, IsRequired = false)]
public string Label { get; set; }
Property Value
- string
The application specific label.
MessageId
Gets the identifier of the message.
[DataMember(Name = "MessageId", Order = 131073, EmitDefaultValue = false, IsRequired = false)]
public string MessageId { get; set; }
Property Value
- string
The identifier of the message.
Properties
Gets the application specific properties of the message.
public IDictionary<string, object> Properties { get; }
Property Value
- IDictionary<string, object>
The application specific properties of the message.
ReplyTo
Gets the address of the queue to reply to.
[DataMember(Name = "ReplyTo", Order = 131075, EmitDefaultValue = false, IsRequired = false)]
public string ReplyTo { get; set; }
Property Value
- string
The address of the queue to reply to.
ReplyToSessionId
Gets the session identifier to reply to.
[DataMember(Name = "ReplyToSessionId", Order = 131078, EmitDefaultValue = false, IsRequired = false)]
public string ReplyToSessionId { get; set; }
Property Value
- string
The session identifier to reply to.
RequiresPreprocessing
Gets a value indicating whether the CorrelationFilter expression requires preprocessing.
public override bool RequiresPreprocessing { get; }
Property Value
- bool
true if the CorrelationFilter expression requires preprocessing; otherwise, false.
SessionId
Gets the session identifier.
[DataMember(Name = "SessionId", Order = 131077, EmitDefaultValue = false, IsRequired = false)]
public string SessionId { get; set; }
Property Value
- string
The session identifier.
To
Gets the address to send to.
[DataMember(Name = "To", Order = 131074, EmitDefaultValue = false, IsRequired = false)]
public string To { get; set; }
Property Value
- string
The address to send to.
Methods
Match(BrokeredMessage)
Indicates whether a message matches against the current SQL expression.
public override bool Match(BrokeredMessage message)
Parameters
message
BrokeredMessageThe BrokeredMessage.
Returns
- bool
true if a message matches against the current SQL expression; otherwise, false.
Preprocess()
Gets the preprocessed filter expression.
public override Filter Preprocess()
Returns
- Filter
The preprocessed filter expression.
ToString()
Converts the value of the current instance to its equivalent string representation.
public override string ToString()
Returns
- string
A string representation of the current instance.
Validate()
Validates the CorrelationFilter object.
public override void Validate()