Interface IMessageSelectorPredicate
- Namespace
- Virtufin.Core.Predicates
- Assembly
- Virtufin.Core.dll
A composable filter that decides whether a given IMessage should be considered for a given IContract at a given time and scenario history.
public interface IMessageSelectorPredicate
Remarks
Implementations must be displayable so composite predicates (AllMessageSelectorPredicate) can render a human-readable summary of the composed filter.
Methods
FilterMessages(IContract, IEnumerable<IMessage>, ITimeStamp, IScenarioHistory)
Filter messages to those matching this predicate.
IEnumerable<IMessage> FilterMessages(IContract contract, IEnumerable<IMessage> messages, ITimeStamp timePoint, IScenarioHistory scenarioHistory)
Parameters
contractIContractmessagesIEnumerable<IMessage>timePointITimeStampscenarioHistoryIScenarioHistory
Returns
Predicate(IContract, IMessage, ITimeStamp, IScenarioHistory)
Returns true if message should be retained
for contract at timePoint.
bool Predicate(IContract contract, IMessage message, ITimeStamp timePoint, IScenarioHistory scenarioHistory)
Parameters
contractIContractContract under evaluation.
messageIMessageCandidate message.
timePointITimeStampCurrent simulation time.
scenarioHistoryIScenarioHistoryPrior history.