Interface IMessageCondition<T>
Contract for mapping conditions to messages
Namespace: Steeltoe.Messaging.Handler
Assembly: Steeltoe.Messaging.Abstractions.dll
Syntax
public interface IMessageCondition<T> : IMessageCondition
Type Parameters
Name | Description |
---|---|
T | the kind of condition that this condition can be combined with |
Methods
| Edit this page View SourceCombine(T)
Define the rules for combining this condition with another.
Declaration
T Combine(T other)
Parameters
Type | Name | Description |
---|---|---|
T | other | the condition to combine with |
Returns
Type | Description |
---|---|
T | the resulting message condition |
CompareTo(T, IMessage)
Compare this condition to another in the context of a specific message.
Declaration
int CompareTo(T other, IMessage message)
Parameters
Type | Name | Description |
---|---|---|
T | other | the other condition to compare to |
IMessage | message | the message under process |
Returns
Type | Description |
---|---|
System.Int32 | results of the comparison |
GetMatchingCondition(IMessage)
Check if this condition matches the given Message and returns a potentially new condition with content tailored to the current message.
Declaration
T GetMatchingCondition(IMessage message)
Parameters
Type | Name | Description |
---|---|---|
IMessage | message | the message under process |
Returns
Type | Description |
---|---|
T | a condition instance in case of a match; or null if no match |