/// <summary> /// Relay handler. Called from the SelectorMapper's For(...). This /// creates a conditional handler that will select a spcific /// configuration when a specifid condition is true. /// </summary> /// <param name="condition">Test delegate to test whether to execute action.</param> /// <returns>Fluent Interface</returns> public IWhenChain <T> When(Func <T, bool> condition) { SelectorConditional <T> selectCondition = new SelectorConditional <T>() { TypeNameResourceKey = TypeNameResourceKey, TypeNameAccessor = TypeNameAccessor }; AddToSelectorMap(selectCondition); return(selectCondition.When(condition)); }
public ConditionalRelayWhen(SelectorConditional <T> selector, Func <T, bool> condition) { Selector = selector; Condition = condition; }
public ConditionalRelayMessage(SelectorConditional <T> selector, MessageProcessor <T> messageProcessor) { Selector = selector; MessageProcessor = messageProcessor; }
public ConditionalRelayDefault(SelectorConditional <T> selector) { Selector = selector; }