public BlobTriggerBinding(ParameterInfo parameter,
                                  BlobServiceClient hostBlobServiceClient,
                                  QueueServiceClient hostQueueServiceClient,
                                  BlobServiceClient dataBlobServiceClient,
                                  QueueServiceClient dataQueueServiceClient,
                                  IBlobPathSource path,
                                  IHostIdProvider hostIdProvider,
                                  BlobsOptions blobsOptions,
                                  IWebJobsExceptionHandler exceptionHandler,
                                  IContextSetter <IBlobWrittenWatcher> blobWrittenWatcherSetter,
                                  SharedQueueWatcher messageEnqueuedWatcherSetter,
                                  ISharedContextProvider sharedContextProvider,
                                  IHostSingletonManager singletonManager,
                                  ILoggerFactory loggerFactory)
        {
            _parameter              = parameter ?? throw new ArgumentNullException(nameof(parameter));
            _hostBlobServiceClient  = hostBlobServiceClient ?? throw new ArgumentNullException(nameof(hostBlobServiceClient));
            _hostQueueServiceClient = hostQueueServiceClient ?? throw new ArgumentNullException(nameof(hostQueueServiceClient));
            _dataBlobServiceClient  = dataBlobServiceClient ?? throw new ArgumentNullException(nameof(dataBlobServiceClient));
            _dataQueueServiceClient = dataQueueServiceClient ?? throw new ArgumentNullException(nameof(dataQueueServiceClient));

            _accountName                  = _dataBlobServiceClient.AccountName;
            _path                         = path ?? throw new ArgumentNullException(nameof(path));
            _hostIdProvider               = hostIdProvider ?? throw new ArgumentNullException(nameof(hostIdProvider));
            _blobsOptions                 = blobsOptions ?? throw new ArgumentNullException(nameof(blobsOptions));
            _exceptionHandler             = exceptionHandler ?? throw new ArgumentNullException(nameof(exceptionHandler));
            _blobWrittenWatcherSetter     = blobWrittenWatcherSetter ?? throw new ArgumentNullException(nameof(blobWrittenWatcherSetter));
            _messageEnqueuedWatcherSetter = messageEnqueuedWatcherSetter ?? throw new ArgumentNullException(nameof(messageEnqueuedWatcherSetter));
            _sharedContextProvider        = sharedContextProvider ?? throw new ArgumentNullException(nameof(sharedContextProvider));
            _singletonManager             = singletonManager ?? throw new ArgumentNullException(nameof(singletonManager));
            _loggerFactory                = loggerFactory;
            _converter                    = CreateConverter(_dataBlobServiceClient);
            _bindingDataContract          = CreateBindingDataContract(path);
        }
        public BlobTriggerAttributeBindingProvider(
            INameResolver nameResolver,
            BlobServiceClientProvider blobServiceClientProvider,
            QueueServiceClientProvider queueServiceClientProvider,
            IHostIdProvider hostIdProvider,
            IOptions <BlobsOptions> blobsOptions,
            IWebJobsExceptionHandler exceptionHandler,
            IContextSetter <IBlobWrittenWatcher> blobWrittenWatcherSetter,
            BlobTriggerQueueWriterFactory blobTriggerQueueWriterFactory,
            ISharedContextProvider sharedContextProvider,
            IHostSingletonManager singletonManager,
            ILoggerFactory loggerFactory)
        {
            _blobServiceClientProvider  = blobServiceClientProvider ?? throw new ArgumentNullException(nameof(blobServiceClientProvider));
            _queueServiceClientProvider = queueServiceClientProvider ?? throw new ArgumentNullException(nameof(queueServiceClientProvider));
            _hostIdProvider             = hostIdProvider ?? throw new ArgumentNullException(nameof(hostIdProvider));
            _blobsOptions                  = (blobsOptions ?? throw new ArgumentNullException(nameof(blobsOptions))).Value;
            _exceptionHandler              = exceptionHandler ?? throw new ArgumentNullException(nameof(exceptionHandler));
            _blobWrittenWatcherSetter      = blobWrittenWatcherSetter ?? throw new ArgumentNullException(nameof(blobWrittenWatcherSetter));
            _blobTriggerQueueWriterFactory = blobTriggerQueueWriterFactory ?? throw new ArgumentNullException(nameof(blobTriggerQueueWriterFactory));
            _sharedContextProvider         = sharedContextProvider ?? throw new ArgumentNullException(nameof(sharedContextProvider));
            _singletonManager              = singletonManager ?? throw new ArgumentNullException(nameof(singletonManager));

            _nameResolver  = nameResolver;
            _loggerFactory = loggerFactory;
            _logger        = loggerFactory.CreateLogger <BlobTriggerAttributeBindingProvider>();
        }
Beispiel #3
0
        public BlobTriggerAttributeBindingProvider(INameResolver nameResolver,
                                                   StorageAccountProvider accountProvider,
                                                   IHostIdProvider hostIdProvider,
                                                   IOptions <QueuesOptions> queueOptions,
                                                   IOptions <BlobsOptions> blobsOptions,
                                                   IWebJobsExceptionHandler exceptionHandler,
                                                   IContextSetter <IBlobWrittenWatcher> blobWrittenWatcherSetter,
                                                   SharedQueueWatcher messageEnqueuedWatcherSetter,
                                                   ISharedContextProvider sharedContextProvider,
                                                   IHostSingletonManager singletonManager,
                                                   ILoggerFactory loggerFactory)
        {
            _accountProvider              = accountProvider ?? throw new ArgumentNullException(nameof(accountProvider));
            _hostIdProvider               = hostIdProvider ?? throw new ArgumentNullException(nameof(hostIdProvider));
            _queueOptions                 = (queueOptions ?? throw new ArgumentNullException(nameof(queueOptions))).Value;
            _blobsOptions                 = (blobsOptions ?? throw new ArgumentNullException(nameof(blobsOptions))).Value;
            _exceptionHandler             = exceptionHandler ?? throw new ArgumentNullException(nameof(exceptionHandler));
            _blobWrittenWatcherSetter     = blobWrittenWatcherSetter ?? throw new ArgumentNullException(nameof(blobWrittenWatcherSetter));
            _messageEnqueuedWatcherSetter = messageEnqueuedWatcherSetter ?? throw new ArgumentNullException(nameof(messageEnqueuedWatcherSetter));
            _sharedContextProvider        = sharedContextProvider ?? throw new ArgumentNullException(nameof(sharedContextProvider));
            _singletonManager             = singletonManager ?? throw new ArgumentNullException(nameof(singletonManager));

            _nameResolver  = nameResolver;
            _loggerFactory = loggerFactory;
        }
 public BlobListenerFactory(IHostIdProvider hostIdProvider,
                            BlobsOptions blobsOptions,
                            IWebJobsExceptionHandler exceptionHandler,
                            IContextSetter <IBlobWrittenWatcher> blobWrittenWatcherSetter,
                            SharedQueueWatcher messageEnqueuedWatcherSetter,
                            ISharedContextProvider sharedContextProvider,
                            ILoggerFactory loggerFactory,
                            FunctionDescriptor functionDescriptor,
                            BlobServiceClient hostBlobServiceClient,
                            QueueServiceClient hostQueueServiceClient,
                            BlobServiceClient dataBlobServiceClient,
                            QueueServiceClient dataQueueServiceClient,
                            BlobContainerClient container,
                            IBlobPathSource input,
                            ITriggeredFunctionExecutor executor,
                            IHostSingletonManager singletonManager)
 {
     _hostIdProvider               = hostIdProvider ?? throw new ArgumentNullException(nameof(hostIdProvider));
     _blobsOptions                 = blobsOptions ?? throw new ArgumentNullException(nameof(blobsOptions));
     _exceptionHandler             = exceptionHandler ?? throw new ArgumentNullException(nameof(exceptionHandler));
     _blobWrittenWatcherSetter     = blobWrittenWatcherSetter ?? throw new ArgumentNullException(nameof(blobWrittenWatcherSetter));
     _messageEnqueuedWatcherSetter = messageEnqueuedWatcherSetter ?? throw new ArgumentNullException(nameof(messageEnqueuedWatcherSetter));
     _sharedContextProvider        = sharedContextProvider ?? throw new ArgumentNullException(nameof(sharedContextProvider));
     _functionDescriptor           = functionDescriptor ?? throw new ArgumentNullException(nameof(functionDescriptor));
     _loggerFactory                = loggerFactory;
     _hostBlobServiceClient        = hostBlobServiceClient ?? throw new ArgumentNullException(nameof(hostBlobServiceClient));
     _hostQueueServiceClient       = hostQueueServiceClient ?? throw new ArgumentNullException(nameof(hostQueueServiceClient));
     _dataBlobServiceClient        = dataBlobServiceClient ?? throw new ArgumentNullException(nameof(dataBlobServiceClient));
     _dataQueueServiceClient       = dataQueueServiceClient ?? throw new ArgumentNullException(nameof(dataQueueServiceClient));
     _container        = container ?? throw new ArgumentNullException(nameof(container));
     _input            = input ?? throw new ArgumentNullException(nameof(input));
     _executor         = executor ?? throw new ArgumentNullException(nameof(executor));
     _singletonManager = singletonManager ?? throw new ArgumentNullException(nameof(singletonManager));
 }
 public BlobListenerFactory(IHostIdProvider hostIdProvider,
                            QueuesOptions queueOptions,
                            BlobsOptions blobsOptions,
                            IWebJobsExceptionHandler exceptionHandler,
                            IContextSetter <IBlobWrittenWatcher> blobWrittenWatcherSetter,
                            SharedQueueWatcher messageEnqueuedWatcherSetter,
                            ISharedContextProvider sharedContextProvider,
                            ILoggerFactory loggerFactory,
                            string functionId,
                            StorageAccount hostAccount,
                            StorageAccount dataAccount,
                            CloudBlobContainer container,
                            IBlobPathSource input,
                            ITriggeredFunctionExecutor executor,
                            IHostSingletonManager singletonManager)
 {
     _hostIdProvider               = hostIdProvider ?? throw new ArgumentNullException(nameof(hostIdProvider));
     _queueOptions                 = queueOptions ?? throw new ArgumentNullException(nameof(queueOptions));
     _blobsOptions                 = blobsOptions ?? throw new ArgumentNullException(nameof(blobsOptions));
     _exceptionHandler             = exceptionHandler ?? throw new ArgumentNullException(nameof(exceptionHandler));
     _blobWrittenWatcherSetter     = blobWrittenWatcherSetter ?? throw new ArgumentNullException(nameof(blobWrittenWatcherSetter));
     _messageEnqueuedWatcherSetter = messageEnqueuedWatcherSetter ?? throw new ArgumentNullException(nameof(messageEnqueuedWatcherSetter));
     _sharedContextProvider        = sharedContextProvider ?? throw new ArgumentNullException(nameof(sharedContextProvider));
     _loggerFactory                = loggerFactory;
     _functionId       = functionId;
     _hostAccount      = hostAccount ?? throw new ArgumentNullException(nameof(hostAccount));
     _dataAccount      = dataAccount ?? throw new ArgumentNullException(nameof(dataAccount));
     _container        = container ?? throw new ArgumentNullException(nameof(container));
     _input            = input ?? throw new ArgumentNullException(nameof(input));
     _executor         = executor ?? throw new ArgumentNullException(nameof(executor));
     _singletonManager = singletonManager ?? throw new ArgumentNullException(nameof(singletonManager));
 }