Table of Contents

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

contract IContract
messages IEnumerable<IMessage>
timePoint ITimeStamp
scenarioHistory IScenarioHistory

Returns

IEnumerable<IMessage>

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

contract IContract

Contract under evaluation.

message IMessage

Candidate message.

timePoint ITimeStamp

Current simulation time.

scenarioHistory IScenarioHistory

Prior history.

Returns

bool