Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GrowActivityHandler"/> class.
 /// </summary>
 /// <param name="logger">Logger implementation to send logs to the logger service.</param>
 /// <param name="localizer">The current cultures' string localizer.</param>
 /// <param name="telemetryClient">The Application Insights telemetry client.</param>
 /// <param name="messagingExtensionHelper">Helper to send cards and display projects in messaging extension.</param>
 /// <param name="userState">State management object for maintaining user conversation state.</param>
 /// <param name="userDetailProvider">Provider instance to work with user data.</param>
 /// <param name="botOptions">A set of key/value application configuration properties for activity handler.</param>
 /// <param name="teamSkillStorageProvider">Team skill storage provider dependency injection.</param>
 /// <param name="projectStorageProvider">Project storage provider dependency injection.</param>
 /// <param name="projectSearchService">Search service helper to fetch projects based on filters and search criteria.</param>
 /// <param name="notificationHelper">Instance to send notifications to users.</param>
 /// <param name="teamStorageProvider">Provider for fetching information about team details from storage table.</param>
 public GrowActivityHandler(
     ILogger <GrowActivityHandler> logger,
     IStringLocalizer <Strings> localizer,
     TelemetryClient telemetryClient,
     IMessagingExtensionHelper messagingExtensionHelper,
     UserState userState,
     IUserDetailProvider userDetailProvider,
     IOptions <BotSettings> botOptions,
     ITeamSkillStorageProvider teamSkillStorageProvider,
     IProjectStorageProvider projectStorageProvider,
     IProjectSearchService projectSearchService,
     NotificationHelper notificationHelper,
     ITeamStorageProvider teamStorageProvider)
 {
     this.logger                   = logger;
     this.localizer                = localizer;
     this.telemetryClient          = telemetryClient;
     this.messagingExtensionHelper = messagingExtensionHelper;
     this.userState                = userState;
     this.userDetailProvider       = userDetailProvider;
     this.botOptions               = botOptions ?? throw new ArgumentNullException(nameof(botOptions));
     this.teamSkillStorageProvider = teamSkillStorageProvider;
     this.projectStorageProvider   = projectStorageProvider;
     this.projectSearchService     = projectSearchService;
     this.notificationHelper       = notificationHelper;
     this.teamStorageProvider      = teamStorageProvider;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="LearnNowActivityHandler"/> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="localizer">The current cultures' string localizer.</param>
 /// <param name="telemetryClient">The Application Insights telemetry client. </param>
 /// <param name="messagingExtensionHelper">Messaging Extension helper dependency injection.</param>
 /// <param name="botOptions">A set of key/value application configuration properties for activity handler.</param>
 public LearnNowActivityHandler(
     ILogger <LearnNowActivityHandler> logger,
     IStringLocalizer <Strings> localizer,
     TelemetryClient telemetryClient,
     IMessagingExtensionHelper messagingExtensionHelper,
     IOptions <BotSettings> botOptions)
 {
     this.logger                   = logger;
     this.localizer                = localizer;
     this.telemetryClient          = telemetryClient;
     this.botOptions               = botOptions ?? throw new ArgumentNullException(nameof(botOptions));
     this.messagingExtensionHelper = messagingExtensionHelper;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EmployeeTrainingActivityHandler"/> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="localizer">The current cultures' string localizer.</param>
 /// <param name="telemetryClient">The Application Insights telemetry client. </param>
 /// <param name="options">The options.</param>
 /// <param name="activityHandlerHelper">Provides helper methods for bot related activities.</param>
 /// <param name="messagingExtensionHelper">Helper to send cards and display projects in messaging extension.</param>
 public EmployeeTrainingActivityHandler(
     ILogger <EmployeeTrainingActivityHandler> logger,
     IStringLocalizer <Strings> localizer,
     TelemetryClient telemetryClient,
     IOptions <BotSettings> options,
     IActivityHandlerHelper activityHandlerHelper,
     IMessagingExtensionHelper messagingExtensionHelper)
 {
     this.logger                   = logger;
     this.localizer                = localizer;
     this.telemetryClient          = telemetryClient;
     this.botOptions               = options;
     this.activityHandlerHelper    = activityHandlerHelper;
     this.messagingExtensionHelper = messagingExtensionHelper;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SubmitIdeaActivityHandler"/> class.
 /// </summary>
 /// <param name="logger">Instance to send logs to the logger service.</param>
 /// <param name="localizer">The current cultures' string localizer.</param>
 /// <param name="telemetryClient">The Application Insights telemetry client.</param>
 /// <param name="messagingExtensionHelper">Messaging Extension helper dependency injection.</param>
 /// <param name="userState">State management object for maintaining user conversation state.</param>
 /// <param name="teamPreferenceStorageHelper">Team preference storage helper dependency injection.</param>
 /// <param name="teamPreferenceStorageProvider">Team preference storage provider dependency injection.</param>
 /// <param name="botOptions">A set of key/value application configuration properties for activity handler.</param>
 /// <param name="teamStorageProvider">Provider for fetching information about team details from storage.</param>
 public SubmitIdeaActivityHandler(
     ILogger <SubmitIdeaActivityHandler> logger,
     IStringLocalizer <Strings> localizer,
     TelemetryClient telemetryClient,
     IMessagingExtensionHelper messagingExtensionHelper,
     UserState userState,
     ITeamPreferenceStorageHelper teamPreferenceStorageHelper,
     ITeamPreferenceStorageProvider teamPreferenceStorageProvider,
     IOptions <BotSettings> botOptions,
     ITeamStorageProvider teamStorageProvider)
 {
     this.logger                        = logger;
     this.localizer                     = localizer;
     this.telemetryClient               = telemetryClient;
     this.messagingExtensionHelper      = messagingExtensionHelper;
     this.userState                     = userState;
     this.teamPreferenceStorageHelper   = teamPreferenceStorageHelper;
     this.teamPreferenceStorageProvider = teamPreferenceStorageProvider;
     this.botOptions                    = botOptions ?? throw new ArgumentNullException(nameof(botOptions));
     this.curatorTeamId                 = botOptions.Value.CuratorTeamId;
     this.teamStorageProvider           = teamStorageProvider;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GoodReadsActivityHandler"/> class.
 /// </summary>
 /// <param name="logger">Instance to send logs to the Application Insights service.</param>
 /// <param name="localizer">The current cultures' string localizer.</param>
 /// <param name="telemetryClient">The Application Insights telemetry client.</param>
 /// <param name="options">>A set of key/value application configuration properties for activity handler.</param>
 /// <param name="messagingExtensionHelper">Messaging Extension helper dependency injection.</param>
 /// <param name="userState">State management object for maintaining user conversation state.</param>
 /// <param name="teamPreferenceStorageHelper">Team preference storage helper dependency injection.</param>
 /// <param name="teamPreferenceStorageProvider">Team preference storage provider dependency injection.</param>
 /// <param name="teamTagStorageProvider">Team tags storage provider dependency injection.</param>
 /// <param name="botOptions">A set of key/value application configuration properties for activity handler.</param>
 public GoodReadsActivityHandler(
     ILogger <GoodReadsActivityHandler> logger,
     IStringLocalizer <Strings> localizer,
     TelemetryClient telemetryClient,
     IOptions <GoodReadsActivityHandlerOptions> options,
     IMessagingExtensionHelper messagingExtensionHelper,
     UserState userState,
     ITeamPreferenceStorageHelper teamPreferenceStorageHelper,
     ITeamPreferenceStorageProvider teamPreferenceStorageProvider,
     ITeamTagStorageProvider teamTagStorageProvider,
     IOptions <BotSettings> botOptions)
 {
     this.logger                        = logger;
     this.localizer                     = localizer;
     this.telemetryClient               = telemetryClient;
     this.options                       = options ?? throw new ArgumentNullException(nameof(options));
     this.messagingExtensionHelper      = messagingExtensionHelper;
     this.userState                     = userState;
     this.teamPreferenceStorageHelper   = teamPreferenceStorageHelper;
     this.teamPreferenceStorageProvider = teamPreferenceStorageProvider;
     this.teamTagStorageProvider        = teamTagStorageProvider;
     this.botOptions                    = botOptions ?? throw new ArgumentNullException(nameof(botOptions));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CannedResponsesActivityHandler"/> class.
 /// </summary>
 /// <param name="logger">Instance to send logs to the Application Insights service.</param>
 /// <param name="localizer">The current cultures' string localizer.</param>
 /// <param name="telemetryClient">The Application Insights telemetry client.</param>
 /// <param name="options">>A set of key/value application configuration properties for activity handler.</param>
 /// <param name="userResponseStorageProvider">User response storage provider to maintain data in Microsoft Azure table storage.</param>
 /// <param name="companyResponseStorageProvider">Company response storage provider to maintain data in Microsoft Azure table storage.</param>
 /// <param name="userResponseSearchService">The user response search service dependency injection.</param>
 /// <param name="companyResponseSearchService">The company response search service dependency injection.</param>
 /// <param name="userState">State management object for maintaining user conversation state.</param>
 /// <param name="microsoftAppCredentials">Microsoft application credentials to send card to the specified team.</param>
 /// <param name="tokenHelper">Generating custom JWT token and retrieving user detail from token.</param>
 /// <param name="botSetting">>A set of key/value application configuration properties for bot.</param>
 /// <param name="telemetrySettings">>Application insights settings.</param>
 /// <param name="userStorageHelper">User storage helper dependency injection.</param>
 /// <param name="companyStorageHelper">Company storage helper dependency injection.</param>
 /// <param name="messagingExtensionHelper">Messaging Extension helper dependency injection.</param>
 /// <param name="conversationStorageProvider">Conversation storage provider to maintain data in Microsoft Azure table storage.</param>
 public CannedResponsesActivityHandler(
     ILogger <CannedResponsesActivityHandler> logger,
     IStringLocalizer <Strings> localizer,
     TelemetryClient telemetryClient,
     IOptions <CannedResponsesActivityHandlerOptions> options,
     IUserResponseStorageProvider userResponseStorageProvider,
     ICompanyResponseStorageProvider companyResponseStorageProvider,
     IUserResponseSearchService userResponseSearchService,
     ICompanyResponseSearchService companyResponseSearchService,
     UserState userState,
     MicrosoftAppCredentials microsoftAppCredentials,
     ITokenHelper tokenHelper,
     IOptions <BotSetting> botSetting,
     IOptions <TelemetrySetting> telemetrySettings,
     IUserStorageHelper userStorageHelper,
     ICompanyStorageHelper companyStorageHelper,
     IMessagingExtensionHelper messagingExtensionHelper,
     IConversationStorageProvider conversationStorageProvider)
 {
     this.logger                         = logger;
     this.localizer                      = localizer;
     this.telemetryClient                = telemetryClient;
     this.options                        = options;
     this.userResponseStorageProvider    = userResponseStorageProvider;
     this.companyResponseStorageProvider = companyResponseStorageProvider;
     this.userResponseSearchService      = userResponseSearchService;
     this.companyResponseSearchService   = companyResponseSearchService;
     this.userState                      = userState;
     this.tokenHelper                    = tokenHelper;
     this.microsoftAppCredentials        = microsoftAppCredentials;
     this.botSetting                     = botSetting;
     this.telemetrySettings              = telemetrySettings;
     this.userStorageHelper              = userStorageHelper;
     this.companyStorageHelper           = companyStorageHelper;
     this.messagingExtensionHelper       = messagingExtensionHelper;
     this.conversationStorageProvider    = conversationStorageProvider;
 }