public DataManager(IProfilesRepository profiles, ISkillTagsRepository skillTags, IMessagesRepository messages, IDialogsRepository dialogs) { Profiles = profiles; SkillTags = skillTags; Messages = messages; Dialogs = dialogs; }
public BehaviorExecutor( IInterpreter interpreter, ILogger <BehaviorExecutor> logger, IServiceProvider serviceProvider, IOutgoingServicePool outgoingServicePool, IConnectionsRepository connectionsRepository, IDialogsRepository dialogsRepository, IOptions <ServiceOptions> options ) { _interpreter = interpreter; _logger = logger; _serviceProvider = serviceProvider; _outgoingServicePool = outgoingServicePool; _connectionsRepository = connectionsRepository; _dialogsRepository = dialogsRepository; _options = options.Value; _timer = new Timer(ClearExpiredDialogs, null, TimeSpan.Zero, TimeSpan.FromMilliseconds(_options.DialogTTLMs * 2)); }
/// <summary> /// Initializes a new instance of the <see cref="BasicBot"/> class. /// </summary> /// <param name="botServices">Bot services.</param> /// <param name="accessors">Bot State Accessors.</param> public BasicBot(BotServices services, UserState userState, ConversationState conversationState, ILoggerFactory loggerFactory, IDialogsRepository dialogsRepository) { _services = services ?? throw new ArgumentNullException(nameof(services)); _userState = userState ?? throw new ArgumentNullException(nameof(userState)); _conversationState = conversationState ?? throw new ArgumentNullException(nameof(conversationState)); _greetingStateAccessor = _userState.CreateProperty <GreetingState>(nameof(GreetingState)); _dialogStateAccessor = _conversationState.CreateProperty <DialogState>(nameof(DialogState)); _dialogsRepository = dialogsRepository; // Verify LUIS configuration. if (!_services.LuisServices.ContainsKey(LuisConfiguration)) { throw new InvalidOperationException($"The bot configuration does not contain a service type of `luis` with the id `{LuisConfiguration}`."); } Dialogs = new DialogSet(_dialogStateAccessor); Dialogs.Add(new GreetingDialog(_greetingStateAccessor, loggerFactory)); //Dialogs.Add(new TeamFoundationServerMonolog(_greetingStateAccessor, loggerFactory)); }
public TfsController(IDialogsRepository dialogsRepository, Microsoft.Bot.Configuration.BotConfiguration botConfiguration) { _dialogsRepository = dialogsRepository; _botConfiguration = botConfiguration; }
public WebhooksController(IRepository repository, IDialogsRepository dialogsRepository, Microsoft.Bot.Configuration.BotConfiguration botConfiguration) { _repository = repository; _dialogsRepository = dialogsRepository; _botConfiguration = botConfiguration; }