Table of Contents

Class Filter

Namespace
Microsoft.ServiceBus.Messaging
Assembly
Microsoft.ServiceBus.dll

Describes a filter expression that is evaluated against a BrokeredMessage.

[DataContract(Name = "Filter", Namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect")]
[KnownType(typeof(TrueFilter))]
[KnownType(typeof(DateTimeOffset))]
[KnownType(typeof(SqlFilter))]
[KnownType(typeof(FalseFilter))]
[KnownType(typeof(CorrelationFilter))]
public abstract class Filter : IExtensibleDataObject
Inheritance
Filter
Implements
IExtensibleDataObject
Derived
Inherited Members

Properties

RequiresPreprocessing

Gets a value indicating whether the filter expression requires preprocessing.

public abstract bool RequiresPreprocessing { get; }

Property Value

bool

true if the filter expression requires preprocessing; otherwise, false.

Methods

Match(BrokeredMessage)

Matches the BrokeredMessage against the FilterExpression.

public abstract bool Match(BrokeredMessage message)

Parameters

message BrokeredMessage

The BrokeredMessage object.

Returns

bool

true if the BrokeredMessage matches the filtering expression; otherwise, false.

Exceptions

InvalidOperationException

The operation is invalid with the current state of object.

Microsoft.ServiceBus.Messaging.FilterActionException

Filter evaluation failed.

Preprocess()

Preprocesses the filter expression and returns a preprocessed FilterExpression.

public abstract Filter Preprocess()

Returns

Filter

The preprocessed FilterExpression.

Exceptions

InvalidOperationException

The operation is invalid with the current state of object.

Validate()

Validates the FilterExpression and make sure it complies with the valid grammar rules.

public abstract void Validate()

Exceptions

Microsoft.ServiceBus.Messaging.FilterActionException

The filter statement is invalid or is potentially complex enough to consume too much computing power when evaluating the statement.