public void Load(ISolutionDefinitionHost solutionDefinitionHost)
 {
     solutionDefinitionHost.SolveWhereDoesThePassengerWantToTravelTo()
         .When(question => question.PanicModeEnabled)
             .ByEvaluating((question, inPanicMode) => inPanicMode ? 0 : default(int?))
         .When(question => !question.PanicModeEnabled)
             .ByEvaluating((question, parameter) => default(int?));
 }
Esempio n. 2
0
 public void Load(ISolutionDefinitionHost solutionDefinitionHost)
 {
     solutionDefinitionHost.SolveWhereDoesThePassengerWantToTravelTo()
         .AggregateWithExpressionAggregator(0, (aggregate, expressionResult) => expressionResult ?? aggregate)
         .ByEvaluating((question, panicMode) => 42);
 }