Exemplo n.º 1
0
        // Module 2 add accessors to signature
        public BackMeUp(DialogAccessors accessors, BackPainDialogFactory backPainDialogFactory, ILoggerFactory loggerFactory)
        {
            if (loggerFactory == null)
            {
                throw new System.ArgumentNullException(nameof(loggerFactory));
            }

            // Module 2
            _accessors = accessors;
            _dialogs   = new DialogSet(_accessors.DialogState);
            _dialogs.Add(backPainDialogFactory.Configure(_dialogs));

            _logger = loggerFactory.CreateLogger <BackMeUp>();
            _logger.LogTrace("EchoBot turn start.");
        }
Exemplo n.º 2
0
        public BackMeUp(
            LuisRecognizer luis,
            DialogAccessors accessors,
            BackPainDialogFactory backPainDialogFactory,
            HealthOutcomeService healthOutcomeService,
            ILoggerFactory loggerFactory)
        {
            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            _luis                 = luis;
            _accessors            = accessors;
            _healthOutcomeService = healthOutcomeService;
            _dialogs              = new DialogSet(_accessors.DialogState);
            _dialogs.Add(backPainDialogFactory.Configure(_dialogs));

            ILogger logger = loggerFactory.CreateLogger <BackMeUp>();

            logger.LogTrace("EchoBot turn start.");
        }