コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NotificationHelper"/> class.
 /// </summary>
 /// <param name="optionsAccessor">A set of key/value application configuration properties for Group activities bot.</param>
 /// <param name="groupActivityStorageHelper">Helper method for storing group activity details.</param>
 /// <param name="groupNotificationStorageHelper"> Helper method for storing group notification channel details.</param>
 /// <param name="adapter">Bot adapter.</param>
 /// <param name="microsoftAppCredentials">MicrosoftAppCredentials of bot.</param>
 /// <param name="logger">Instance to send logs to the Application Insights service.</param>
 public NotificationHelper(IOptionsMonitor <BotAppSetting> optionsAccessor, IGroupActivityStorageHelper groupActivityStorageHelper, IGroupNotificationStorageHelper groupNotificationStorageHelper, IBotFrameworkHttpAdapter adapter, MicrosoftAppCredentials microsoftAppCredentials, ILogger <NotificationHelper> logger)
 {
     this.options = optionsAccessor.CurrentValue;
     this.groupActivityStorageHelper     = groupActivityStorageHelper;
     this.groupNotificationStorageHelper = groupNotificationStorageHelper;
     this.logger = logger;
     this.microsoftAppCredentials = microsoftAppCredentials;
     this.adapter  = adapter;
     this.tenantId = this.options.TenantId;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ChannelHelper"/> class.
 /// </summary>
 /// <param name="microsoftAppCredentials">App Credentials.</param>
 /// <param name="optionsAccessor">A set of key/value application configuration properties for Group activities bot.</param>
 /// <param name="groupActivityStorageHelper">Helper for storing group activity details in azure table storage.</param>
 /// <param name="graphApiHelper">Helper for accessing Microsoft Graph API.</param>
 /// <param name="groupNotificationStorageHelper">Helper for sending notification in channel.</param>
 /// <param name="backgroundTaskWrapper">Instance for background task wrapper.</param>
 /// <param name="logger">Instance to send logs to the Application Insights service.</param>
 public ChannelHelper(ILogger <ChannelHelper> logger, IOptionsMonitor <BotAppSetting> optionsAccessor, IGroupNotificationStorageHelper groupNotificationStorageHelper, IGroupActivityStorageHelper groupActivityStorageHelper, IGraphApiHelper graphApiHelper, MicrosoftAppCredentials microsoftAppCredentials, BackgroundTaskWrapper backgroundTaskWrapper)
 {
     this.options        = optionsAccessor.CurrentValue;
     this.graphApiHelper = graphApiHelper;
     this.logger         = logger;
     this.groupNotificationStorageHelper = groupNotificationStorageHelper;
     this.groupActivityStorageHelper     = groupActivityStorageHelper;
     this.tenantId = this.options.TenantId;
     this.microsoftAppCredentials = microsoftAppCredentials;
     this.taskWrapper             = backgroundTaskWrapper;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GroupActivitiesBot"/> class.
 /// </summary>
 /// <param name="optionsAccessor">A set of key/value application configuration properties for Group activities bot.</param>
 /// <param name="channelHelper">Helper for creating public and private channels.</param>
 /// <param name="groupingHelper">Helper for grouping members to channels based on specified splitting criteria.</param>
 /// <param name="groupActivityStorageHelper">Helper for storing group activity in azure table storage.</param>
 /// <param name="teamUserHelper">Helper to get group members and verify if user is a team owner.</param>
 /// <param name="telemetryClient">Telemetry client.</param>
 /// <param name="logger">Instance to send logs to the Application Insights service.</param>
 public GroupActivitiesBot(IOptionsMonitor <BotAppSetting> optionsAccessor, IChannelHelper channelHelper, IGroupingHelper groupingHelper, IGroupActivityStorageHelper groupActivityStorageHelper, ITeamUserHelper teamUserHelper, TelemetryClient telemetryClient, ILogger <GroupActivitiesBot> logger)
 {
     this.options                    = optionsAccessor.CurrentValue;
     this.tenantId                   = this.options.TenantId;
     this.appBaseUrl                 = this.options.AppBaseURI;
     this.connectionName             = this.options.ConnectionName;
     this.channelHelper              = channelHelper;
     this.groupingHelper             = groupingHelper;
     this.groupActivityStorageHelper = groupActivityStorageHelper;
     this.teamUserHelper             = teamUserHelper;
     this.telemetryClient            = telemetryClient;
     this.logger = logger;
 }