Пример #1
0
        /// <summary>
        /// Main method.
        /// </summary>
        /// <param name="args">The command line arguments.</param>
        public static void Main(string[] args)
        {
            var evaluationEngine = new EvaluationEngine();
            evaluationEngine.SetLogExtension(new ConsoleLogger());
            
            var questioner = new Questioner(evaluationEngine);
            var answerer = new Answerer(evaluationEngine);

            answerer.PrepareAnswers();
            questioner.Ask();

            Console.ReadLine();
        }
Пример #2
0
        public void Log()
        {
            var engine = new EvaluationEngine();

            engine.SetLogExtension(new Log4NetExtension());

            engine.Solve <TestQuestion, string>()
            .AggregateWithExpressionAggregator(string.Empty, (aggregate, value) => aggregate + value)
            .ByEvaluating(question => new TestExpression("one"))
            .ByEvaluating(question => new TestExpression("two"));

            engine.Answer(new TestQuestion());

            this.log4Net.DumpAllMessagesToConsole();
        }