Class RuleAction
- Namespace
- Microsoft.ServiceBus.Messaging
- Assembly
- Microsoft.ServiceBus.dll
Represents the filter actions which are allowed for the transformation of a message that have been matched by a filter expression.
[DataContract(Name = "RuleAction", Namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect")]
[KnownType(typeof(EmptyRuleAction))]
[KnownType(typeof(SqlRuleAction))]
[KnownType(typeof(CompositeAction))]
[KnownType(typeof(RuleCreationAction))]
[KnownType(typeof(DateTimeOffset))]
public abstract class RuleAction : IExtensibleDataObject
- Inheritance
-
RuleAction
- Implements
-
IExtensibleDataObject
- Derived
- Inherited Members
Remarks
Filter actions allow for the transformation of a message that have been matched by a filter expression. The typical use case for filter acions is to append or update the properties that are attached to a message, for example assigning a group ID based on the correlation ID of a message.
Properties
RequiresPreprocessing
Gets a value that indicates whether the rule action requires preprocessing.
public abstract bool RequiresPreprocessing { get; }
Property Value
- bool
true if the rule action requires preprocessing; otherwise, false.
Methods
Execute(BrokeredMessage)
Executes the filter action on the supplied BrokeredMessage.
public abstract BrokeredMessage Execute(BrokeredMessage message)
Parameters
message
BrokeredMessageInput BrokeredMessage.
Returns
- BrokeredMessage
The modified BrokeredMessage after executing the rule action.
Remarks
Concrete implementation of this class is free to throw InvalidOperationException is this requires preprocessing.
Preprocess()
Preprocesses the RuleAction object.
public abstract RuleAction Preprocess()
Returns
- RuleAction
The preprocessed RuleAction object.
Remarks
Concrete implementation of this class is free to throw InvalidOperationException is this requires preprocessing.
Validate()
Validates the rule action against the grammar.
public abstract void Validate()
Remarks
Concrete implementation of this class is free to throw InvalidOperationException is this requires preprocessing.
- See Also