/// <summary> /// Initializes a new instance of the <see cref="MessageService"/> class. /// </summary> /// <param name="botOptions">The bot options.</param> /// <param name="botAdapter">The bot adapter.</param> public MessageService( IOptions <BotOptions> botOptions, ICCBotFrameworkHttpAdapter botAdapter) { this.microsoftAppId = botOptions?.Value?.UserAppId ?? throw new ArgumentNullException(nameof(botOptions)); this.botAdapter = botAdapter ?? throw new ArgumentNullException(nameof(botAdapter)); }
/// <summary> /// Initializes a new instance of the <see cref="TeamMembersService"/> class. /// </summary> /// <param name="botAdapter">Bot adapter.</param> /// <param name="botOptions">Bot options.</param> public TeamMembersService( ICCBotFrameworkHttpAdapter botAdapter, IOptions <BotOptions> botOptions) { this.botAdapter = botAdapter ?? throw new ArgumentNullException(nameof(botAdapter)); this.userAppId = botOptions?.Value?.UserAppId ?? throw new ArgumentNullException(nameof(botOptions)); this.authorAppId = botOptions?.Value?.AuthorAppId ?? throw new ArgumentNullException(nameof(botOptions)); }
/// <summary> /// Initializes a new instance of the <see cref="ConversationService"/> class. /// </summary> /// <param name="botAdapter">The bot adapter.</param> /// <param name="userAppCredentials">The user Microsoft app credentials.</param> /// <param name="authorAppCredentials">The author Microsoft app credentials.</param> public ConversationService( ICCBotFrameworkHttpAdapter botAdapter, UserAppCredentials userAppCredentials, AuthorAppCredentials authorAppCredentials) { this.botAdapter = botAdapter ?? throw new ArgumentNullException(nameof(botAdapter)); this.userAppCredentials = userAppCredentials ?? throw new ArgumentNullException(nameof(userAppCredentials)); this.authorAppCredentials = authorAppCredentials ?? throw new ArgumentNullException(nameof(authorAppCredentials)); }
/// <summary> /// Initializes a new instance of the <see cref="HandleExportFailureActivity"/> class. /// </summary> /// <param name="exportDataRepository">the export data respository.</param> /// <param name="storageClientFactory">the storage client factory.</param> /// <param name="botOptions">the bot options.</param> /// <param name="botAdapter">the users service.</param> /// <param name="userDataRepository">the user data repository.</param> /// <param name="localizer">Localization service.</param> public HandleExportFailureActivity( IExportDataRepository exportDataRepository, IStorageClientFactory storageClientFactory, IOptions <BotOptions> botOptions, ICCBotFrameworkHttpAdapter botAdapter, IUserDataRepository userDataRepository, IStringLocalizer <Strings> localizer) { this.exportDataRepository = exportDataRepository ?? throw new ArgumentNullException(nameof(exportDataRepository)); this.storageClientFactory = storageClientFactory ?? throw new ArgumentNullException(nameof(storageClientFactory)); this.botAdapter = botAdapter ?? throw new ArgumentNullException(nameof(botAdapter)); this.authorAppId = botOptions?.Value?.AuthorAppId ?? throw new ArgumentNullException(nameof(botOptions)); this.userDataRepository = userDataRepository ?? throw new ArgumentNullException(nameof(userDataRepository)); this.localizer = localizer ?? throw new ArgumentNullException(nameof(localizer)); }
/// <summary> /// Initializes a new instance of the <see cref="SendFileCardActivity"/> class. /// </summary> /// <param name="botOptions">the bot options.</param> /// <param name="botAdapter">the users service.</param> /// <param name="userDataRepository">the user data repository.</param> /// <param name="conversationService">The create author conversation service.</param> /// <param name="options">Teams conversation options.</param> /// <param name="notificationDataRepository">Notification data entity repository.</param> /// <param name="localizer">Localization service.</param> public SendFileCardActivity( IOptions <BotOptions> botOptions, ICCBotFrameworkHttpAdapter botAdapter, IUserDataRepository userDataRepository, IConversationService conversationService, IOptions <TeamsConversationOptions> options, INotificationDataRepository notificationDataRepository, IStringLocalizer <Strings> localizer) { this.botAdapter = botAdapter ?? throw new ArgumentNullException(nameof(botAdapter)); this.authorAppId = botOptions?.Value?.AuthorAppId ?? throw new ArgumentNullException(nameof(botOptions)); this.userDataRepository = userDataRepository ?? throw new ArgumentNullException(nameof(userDataRepository)); this.conversationService = conversationService ?? throw new ArgumentNullException(nameof(conversationService)); this.options = options?.Value ?? throw new ArgumentNullException(nameof(options)); this.notificationDataRepository = notificationDataRepository ?? throw new ArgumentNullException(nameof(notificationDataRepository)); this.localizer = localizer ?? throw new ArgumentNullException(nameof(localizer)); }
/// <summary> /// Initializes a new instance of the <see cref="FileCardService"/> class. /// </summary> /// <param name="botOptions">the bot options.</param> /// <param name="botAdapter">the users service.</param> /// <param name="userDataRepository">the user data repository.</param> /// <param name="localizer">Localization service.</param> public FileCardService( IOptions <BotOptions> botOptions, ICCBotFrameworkHttpAdapter botAdapter, IUserDataRepository userDataRepository, IStringLocalizer <Strings> localizer) { this.botAdapter = botAdapter ?? throw new ArgumentNullException(nameof(botAdapter)); var options = botOptions ?? throw new ArgumentNullException(nameof(botOptions)); if (string.IsNullOrEmpty(options.Value?.AuthorAppId)) { throw new ArgumentException("AuthorAppId setting is missing in the configuration."); } this.authorAppId = options.Value.AuthorAppId; this.userDataRepository = userDataRepository ?? throw new ArgumentNullException(nameof(userDataRepository)); this.localizer = localizer ?? throw new ArgumentNullException(nameof(localizer)); }