示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MainDialog"/> class.
 /// </summary>
 /// <param name="configuration">Application configuration.</param>
 /// <param name="meetingProvider">Helper which exposes methods required for meeting creation process.</param>
 /// <param name="activityStorageProvider">Storage provider to perform fetch, insert and update operation on ActivityEntities table.</param>
 /// <param name="favoriteStorageProvider">Storage provider to perform fetch, insert, update and delete operation on UserFavorites table.</param>
 /// <param name="tokenHelper">Helper for generating and validating JWT token.</param>
 /// <param name="telemetryClient">Telemetry client for logging events and errors.</param>
 /// <param name="userConfigurationStorageProvider">Storage provider to perform fetch operation on UserConfiguration table.</param>
 /// <param name="meetingHelper">Helper class which exposes methods required for meeting creation.</param>
 public MainDialog(IConfiguration configuration, IMeetingProvider meetingProvider, IActivityStorageProvider activityStorageProvider, IFavoriteStorageProvider favoriteStorageProvider, ITokenHelper tokenHelper, TelemetryClient telemetryClient, IUserConfigurationStorageProvider userConfigurationStorageProvider, IMeetingHelper meetingHelper)
     : base(nameof(MainDialog), configuration["ConnectionName"], telemetryClient)
 {
     this.tokenHelper                      = tokenHelper;
     this.telemetryClient                  = telemetryClient;
     this.activityStorageProvider          = activityStorageProvider;
     this.favoriteStorageProvider          = favoriteStorageProvider;
     this.userConfigurationStorageProvider = userConfigurationStorageProvider;
     this.meetingProvider                  = meetingProvider;
     this.meetingHelper                    = meetingHelper;
     this.AddDialog(new OAuthPrompt(
                        nameof(OAuthPrompt),
                        new OAuthPromptSettings
     {
         ConnectionName = this.ConnectionName,
         Text           = Strings.SignInRequired,
         Title          = Strings.SignIn,
         Timeout        = 120000,
     }));
     this.AddDialog(
         new WaterfallDialog(
             nameof(WaterfallDialog),
             new WaterfallStep[] { this.PromptStepAsync, this.CommandStepAsync, this.ProcessStepAsync }));
     this.InitialDialogId = nameof(WaterfallDialog);
 }
        public NotifyApiController(IBotFrameworkHttpAdapter adapter, IConfiguration configuration, ConcurrentDictionary <string, ConversationReference> conversationReferences, TelemetryClient telemetryClient, IActivityStorageProvider activityStorageProvider, IUserConfigurationStorageProvider userConfigurationStorageProvider, IFavoriteStorageProvider favoriteStorageProvider, IMeetingProvider meetingProvider, IMeetingHelper meetingHelper, ITokenHelper tokenHelper)
        {
            _adapter = adapter;
            _conversationReferences = conversationReferences;
            _appId = configuration["MicrosoftAppId"];

            this.telemetryClient                  = telemetryClient;
            this.activityStorageProvider          = activityStorageProvider;
            this.userConfigurationStorageProvider = userConfigurationStorageProvider;
            this.favoriteStorageProvider          = favoriteStorageProvider;
            this.meetingProvider                  = meetingProvider;
            this.meetingHelper = meetingHelper;
            this.tokenHelper   = tokenHelper;
        }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BookAMeetingBot{T}"/> class.
 /// </summary>
 /// <param name="conversationState">Reads and writes conversation state for your bot to storage.</param>
 /// <param name="userState">Reads and writes user specific data to storage.</param>
 /// <param name="dialog">Dialog to be invoked.</param>
 /// <param name="tokenHelper">Generating and validating JWT token.</param>
 /// <param name="activityStorageProvider">Storage provider to perform insert, update and delete operation on ActivityEntities table.</param>
 /// <param name="favoriteStorageProvider">Storage provider to perform insert, update and delete operation on UserFavorites table.</param>
 /// <param name="meetingProvider">Provider for exposing methods required to perform meeting creation.</param>
 /// <param name="telemetryClient">Telemetry client for logging events and errors.</param>
 /// <param name="userConfigurationStorageProvider">Storage provider to perform insert and update operation on UserConfiguration table.</param>
 /// <param name="appBaseUri">Application base URL.</param>
 /// <param name="instrumentationKey">Instrumentation key for application insights logging.</param>
 /// <param name="tenantId">Valid tenant id for which bot will operate.</param>
 public BookAMeetingBot(ConversationState conversationState, UserState userState, T dialog, ITokenHelper tokenHelper, IActivityStorageProvider activityStorageProvider, IFavoriteStorageProvider favoriteStorageProvider, IMeetingProvider meetingProvider, TelemetryClient telemetryClient, IUserConfigurationStorageProvider userConfigurationStorageProvider, string appBaseUri, string instrumentationKey, string tenantId)
 {
     this.conversationState                = conversationState;
     this.userState                        = userState;
     this.dialog                           = dialog;
     this.tokenHelper                      = tokenHelper;
     this.activityStorageProvider          = activityStorageProvider;
     this.favoriteStorageProvider          = favoriteStorageProvider;
     this.meetingProvider                  = meetingProvider;
     this.telemetryClient                  = telemetryClient;
     this.userConfigurationStorageProvider = userConfigurationStorageProvider;
     this.appBaseUri                       = appBaseUri;
     this.instrumentationKey               = instrumentationKey;
     this.tenantId                         = tenantId;
 }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MeetingHelper"/> class.
 /// </summary>
 /// <param name="meetingProvider">Provider for post and get API calls to Graph.</param>
 /// <param name="userConfigurationProvider">Provider for getting user specific configuration.</param>
 /// <param name="roomCollectionStorageProvider">Storage provider to perform fetch operation on RoomCollection table.</param>
 /// <param name="memoryCache">Memory cache to store rooms.</param>
 public MeetingHelper(IMeetingProvider meetingProvider, IRoomCollectionStorageProvider roomCollectionStorageProvider, IMemoryCache memoryCache)
 {
     this.meetingProvider = meetingProvider;
     this.roomCollectionStorageProvider = roomCollectionStorageProvider;
     this.memoryCache = memoryCache;
 }
示例#5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MeetingHelper"/> class.
 /// </summary>
 /// <param name="meetingProvider">Provider for post and get API calls to Graph.</param>
 /// <param name="userConfigurationProvider">Provider for getting user specific configuration.</param>
 /// <param name="roomCollectionStorageProvider">Storage provider to perform fetch operation on RoomCollection table.</param>
 /// <param name="memoryCache">Memory cache to store rooms.</param>
 public MeetingHelper(IMeetingProvider meetingProvider, IMemoryCache memoryCache, IExchangeService exchangeService)
 {
     this.meetingProvider = meetingProvider;
     this.memoryCache     = memoryCache;
     this.exchangeService = exchangeService;
 }
示例#6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MeetingHelper"/> class.
 /// </summary>
 /// <param name="meetingProvider">Provider for post and get API calls to Graph.</param>
 /// <param name="userConfigurationProvider">Provider for getting user specific configuration.</param>
 public MeetingHelper(IMeetingProvider meetingProvider)
 {
     this.meetingProvider = meetingProvider;
 }