Class AllMessageSelectorPredicate
- Namespace
- Virtufin.Core.Predicates
- Assembly
- Virtufin.Core.dll
AND-composition of IMessageSelectorPredicates: matches a message iff every contained predicate accepts it. With an empty predicate list, the predicate accepts every message (vacuous truth).
public sealed class AllMessageSelectorPredicate : IMessageSelectorPredicate
- Inheritance
-
AllMessageSelectorPredicate
- Implements
- Inherited Members
Constructors
AllMessageSelectorPredicate(IReadOnlyList<IMessageSelectorPredicate>)
Construct a composite predicate. If predicates is
empty the composite accepts every message.
public AllMessageSelectorPredicate(IReadOnlyList<IMessageSelectorPredicate> predicates)
Parameters
predicatesIReadOnlyList<IMessageSelectorPredicate>Sub-predicates to AND together.
Methods
Predicate(IContract, IMessage, ITimeStamp, IScenarioHistory)
Returns true if message should be retained
for contract at timePoint.
public bool Predicate(IContract contract, IMessage message, ITimeStamp timePoint, IScenarioHistory scenarioHistory)
Parameters
contractIContractContract under evaluation.
messageIMessageCandidate message.
timePointITimeStampCurrent simulation time.
scenarioHistoryIScenarioHistoryPrior history.
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.