public DemoSkill(DemoSkillServices services, DemoSkillAccessors accessors) { _accessors = accessors; _dialogs = new DialogSet(accessors.ConversationDialogState); _responder = new DemoSkillResponses(); _services = services; RegisterDialogs(); }
/// <summary> /// Initializes service clients which will be used throughout the bot code into a single object. /// It is recommended that you add any additional service clients you may need into the <see cref="DemoSkillServices"/> object and initialize them here. /// These services include AppInsights telemetry client, Luis Recognizers, QnAMaker instances, etc.</summary> /// <param name="config">Bot configuration object based on .bot json file.</param> /// <returns>BotServices object.</returns> private DemoSkillServices InitBotServices(BotConfiguration config) { var connectedServices = new DemoSkillServices(); foreach (var service in config.Services) { switch (service.Type) { case ServiceTypes.Generic: { // update readme with .bot update instructions if (service.Name == "Authentication") { var authentication = service as GenericService; connectedServices.AuthConnectionName = authentication.Configuration["Azure Active Directory v2"]; } break; } } } return(connectedServices); }