コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SharePointHelper"/> class.
 /// </summary>
 /// <param name="logger">Instance of ILogger for telemetry logging.</param>
 /// <param name="options">A set of key/value application configuration properties for SharePoint.</param>
 /// <param name="graphUtility">Instance of Microsoft Graph utility helper.</param>
 /// <param name="memoryCache">MemoryCache instance for caching SharePoint result.</param>
 /// <param name="botSettings">Represents a set of key/value bot settings.</param>
 public SharePointHelper(
     ILogger <SharePointHelper> logger,
     IOptions <SharePointSettings> options,
     IGraphUtilityHelper graphUtility,
     IMemoryCache memoryCache,
     IOptions <BotOptions> botSettings)
 {
     this.logger       = logger;
     this.options      = options ?? throw new ArgumentNullException(nameof(options));
     this.graphUtility = graphUtility;
     this.memoryCache  = memoryCache;
     this.botSettings  = botSettings ?? throw new ArgumentNullException(nameof(botSettings));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="LearningPlanHelper"/> class.
 /// </summary>
 /// <param name="logger">Instance of ILogger</param>
 /// <param name="localizer">The current culture's string localizer.</param>
 /// <param name="botOptions">A set of key/value application configuration properties.</param>
 /// <param name="sharePointOptions">A set of key/value application configuration properties for SharePoint.</param>
 /// <param name="graphUtility">Instance of Microsoft Graph utility helper.</param>
 /// <param name="sharePointHelper">Instance of SharePoint utility helper.</param>
 public LearningPlanHelper(
     ILogger <LearningPlanHelper> logger,
     IStringLocalizer <Strings> localizer,
     IOptions <BotOptions> botOptions,
     IOptions <SharePointSettings> sharePointOptions,
     IGraphUtilityHelper graphUtility,
     ISharePointHelper sharePointHelper)
 {
     this.logger            = logger;
     this.localizer         = localizer;
     this.botOptions        = botOptions ?? throw new ArgumentNullException(nameof(botOptions));
     this.sharePointOptions = sharePointOptions ?? throw new ArgumentNullException(nameof(sharePointOptions));
     this.graphUtility      = graphUtility;
     this.sharePointHelper  = sharePointHelper;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ArchivalBackgroundService"/> class.
 /// BackgroundService class that inherits IHostedService and implements the methods related to sending notification tasks.
 /// </summary>
 /// <param name="scrumStorageProvider">Scrum status storage provider to maintain data in Microsoft Azure table storage.</param>
 /// <param name="scrumStatusStorageProvider">An instance of scrum status storage provider.</param>
 /// /// <param name="graphUtility">Instance of graph utility helper.</param>
 /// <param name="exportHelper">Instance for creating data table and workbook.</param>
 /// <param name="logger">Instance to send logs to the Application Insights service.</param>
 /// <param name="microsoftAppCredentials">MicrosoftAppCredentials of bot.</param>
 /// <param name="options">A set of key/value application configuration properties.</param>
 public ArchivalBackgroundService(
     IScrumStorageProvider scrumStorageProvider,
     IScrumStatusStorageProvider scrumStatusStorageProvider,
     IGraphUtilityHelper graphUtility,
     ExportHelper exportHelper,
     ILogger <ArchivalBackgroundService> logger,
     MicrosoftAppCredentials microsoftAppCredentials,
     IOptions <ScrumStatusActivityHandlerOptions> options)
 {
     this.scrumStorageProvider       = scrumStorageProvider;
     this.scrumStatusStorageProvider = scrumStatusStorageProvider;
     this.graphUtility            = graphUtility;
     this.exportHelper            = exportHelper;
     this.logger                  = logger;
     this.microsoftAppCredentials = microsoftAppCredentials;
     this.options                 = options ?? throw new ArgumentNullException(nameof(options));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ArchivalBackgroundService"/> class.
 /// BackgroundService class that inherits IHostedService and implements the methods related to sending notification tasks.
 /// </summary>
 /// <param name="scrumStorageProvider">Scrum status storage provider to maintain data in Microsoft Azure table storage.</param>
 /// <param name="scrumStatusStorageProvider">An instance of scrum status storage provider.</param>
 /// /// <param name="graphUtility">Instance of graph utility helper.</param>
 /// <param name="exportHelper">Instance for creating data table and workbook.</param>
 /// <param name="logger">Instance to send logs to the Application Insights service.</param>
 /// <param name="options">A set of key/value application configuration properties.</param>
 /// <param name="exportOption">Configuration value to check whether to export scrum details.</param>
 public ArchivalBackgroundService(
     IScrumStorageProvider scrumStorageProvider,
     IScrumStatusStorageProvider scrumStatusStorageProvider,
     IGraphUtilityHelper graphUtility,
     ExportHelper exportHelper,
     ILogger <ArchivalBackgroundService> logger,
     IOptions <ScrumStatusActivityHandlerOptions> options,
     IOptionsMonitor <ExportOptions> exportOption)
 {
     this.scrumStorageProvider       = scrumStorageProvider;
     this.scrumStatusStorageProvider = scrumStatusStorageProvider;
     this.graphUtility = graphUtility;
     this.exportHelper = exportHelper;
     this.logger       = logger;
     this.options      = options ?? throw new ArgumentNullException(nameof(options));
     this.exportOption = exportOption;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AppManagerBackgroundService"/> class.
 /// </summary>
 /// <param name="graphTokenUtility">Instance of Microsoft Graph utility helper.</param>
 /// <param name="appManagerServiceHelper">Helper for working with Microsoft Graph API.</param>
 /// <param name="logger">Instance of ILogger</param>
 /// <param name="userStorageProvider">Provider for fetching information about user details from storage.</param>
 /// <param name="teamMembershipHelper">Helper for team operations with Microsoft Graph API.</param>
 /// <param name="botOptions">A set of key/value application configuration properties.</param>
 /// <param name="securityGroupSettings"> A set of key/value application configuration properties for AAD security group settings.</param>
 /// <param name="userProfileOperations">Helper for working with Microsoft Graph API for user operation.</param>
 public AppManagerBackgroundService(
     IGraphUtilityHelper graphTokenUtility,
     IAppManagerService appManagerServiceHelper,
     ILogger <AppManagerBackgroundService> logger,
     IUserStorageProvider userStorageProvider,
     ITeamMembership teamMembershipHelper,
     IOptions <BotOptions> botOptions,
     IOptions <AadSecurityGroupSettings> securityGroupSettings,
     IUserProfile userProfileOperations)
 {
     this.appManagerServiceHelper = appManagerServiceHelper ?? throw new ArgumentNullException(nameof(appManagerServiceHelper));
     this.graphTokenUtility       = graphTokenUtility ?? throw new ArgumentNullException(nameof(graphTokenUtility));
     this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
     this.userStorageProvider   = userStorageProvider ?? throw new ArgumentNullException(nameof(userStorageProvider));
     this.botOptions            = botOptions ?? throw new ArgumentNullException(nameof(botOptions));
     this.securityGroupSettings = securityGroupSettings ?? throw new ArgumentNullException(nameof(securityGroupSettings));
     this.membersService        = teamMembershipHelper ?? throw new ArgumentNullException(nameof(teamMembershipHelper));
     this.userProfileOperations = userProfileOperations ?? throw new ArgumentNullException(nameof(userProfileOperations));
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActivityHelper{T}"/> class.
 /// </summary>
 /// <param name="logger">Instance to send logs to the Application Insights service.</param>
 /// <param name="userState">State management object for maintaining user conversation state.</param>
 /// <param name="teamStorageProvider">Provider for fetching information about team details from storage.</param>
 /// <param name="localizer">The current culture's string localizer.</param>
 /// <param name="dialog">Base class for all bot dialogs.</param>
 /// <param name="conversationState">State management object for maintaining conversation state.</param>
 /// <param name="teamMembershipHelper">Helper for team operations with Microsoft Graph API.</param>
 /// <param name="userProfileGraphApiHelper">Helper for user profile operations with Microsoft Graph API.</param>
 /// <param name="introductionStorageProvider">Provider for fetching information about new joiner introduction details from storage.</param>
 /// <param name="sharePointHelper">Helper for working with SharePoint.</param>
 /// <param name="introductionCardHelper">Helper for working with introduction cards.</param>
 /// <param name="graphUtility">Instance of Microsoft Graph utility helper.</param>
 /// <param name="welcomeCardFactory">Factory for working with welcome card attachments.</param>
 /// <param name="botOptions">A set of key/value application configuration properties for bot.</param>
 /// <param name="userStorageProvider">Provider for fetching information about user details from storage.</param>
 /// <param name="securityGroupSettings"> A set of key/value application configuration properties for AAD security group settings.</param>
 /// <param name="feedbackProvider">Provider for fetching information about new joiner feedbacks from storage.</param>
 /// <param name="imageUploadProvider">Provider for uploading user image to blob storage.</param>
 public ActivityHelper(
     ILogger <ActivityHelper <T> > logger,
     UserState userState,
     ITeamStorageProvider teamStorageProvider,
     IStringLocalizer <Strings> localizer,
     T dialog,
     ConversationState conversationState,
     ITeamMembership teamMembershipHelper,
     IUserProfile userProfileGraphApiHelper,
     IIntroductionStorageProvider introductionStorageProvider,
     ISharePointHelper sharePointHelper,
     IIntroductionCardHelper introductionCardHelper,
     IGraphUtilityHelper graphUtility,
     IWelcomeCardFactory welcomeCardFactory,
     IOptions <BotOptions> botOptions,
     IUserStorageProvider userStorageProvider,
     IOptions <AadSecurityGroupSettings> securityGroupSettings,
     IFeedbackProvider feedbackProvider,
     IImageUploadProvider imageUploadProvider)
 {
     this.logger                      = logger;
     this.userState                   = userState;
     this.teamStorageProvider         = teamStorageProvider;
     this.localizer                   = localizer;
     this.dialog                      = dialog;
     this.conversationState           = conversationState;
     this.teamOperationGraphApiHelper = teamMembershipHelper;
     this.userProfileGraphApiHelper   = userProfileGraphApiHelper;
     this.introductionStorageProvider = introductionStorageProvider;
     this.sharePointHelper            = sharePointHelper;
     this.introductionCardHelper      = introductionCardHelper;
     this.graphUtility                = graphUtility;
     this.welcomeCardFactory          = welcomeCardFactory;
     this.botOptions                  = botOptions ?? throw new ArgumentNullException(nameof(botOptions));
     this.userStorageProvider         = userStorageProvider;
     this.securityGroupSettings       = securityGroupSettings ?? throw new ArgumentNullException(nameof(securityGroupSettings));
     this.feedbackProvider            = feedbackProvider;
     this.imageUploadProvider         = imageUploadProvider;
 }