コード例 #1
0
 public HostMessageExecutor(IFunctionExecutor innerExecutor, IFunctionIndexLookup functionLookup,
                            IFunctionInstanceLogger functionInstanceLogger)
 {
     _innerExecutor          = innerExecutor;
     _functionLookup         = functionLookup;
     _functionInstanceLogger = functionInstanceLogger;
 }
コード例 #2
0
 public JobHostContext(IFunctionIndexLookup functionLookup,
                       IFunctionExecutor executor,
                       IListener listener,
                       TraceWriter trace)
 {
     _functionLookup = functionLookup;
     _executor       = executor;
     _listener       = listener;
     _trace          = trace;
 }
コード例 #3
0
 public JobHostContext(IFunctionIndexLookup functionLookup,
     IFunctionExecutor executor,
     IListener listener,
     TraceWriter trace)
 {
     _functionLookup = functionLookup;
     _executor = executor;
     _listener = listener;
     _trace = trace;
 }
コード例 #4
0
 public JobHostContext(IFunctionIndexLookup functionLookup,
                       IFunctionExecutor executor,
                       IListener listener,
                       TextWriter log)
 {
     _functionLookup = functionLookup;
     _executor       = executor;
     _listener       = listener;
     _log            = log;
 }
コード例 #5
0
        public HostMessageListenerFactory(IStorageQueue queue,
                                          IQueueConfiguration queueConfiguration,
                                          IWebJobsExceptionHandler exceptionHandler,
                                          TraceWriter trace,
                                          ILoggerFactory loggerFactory,
                                          IFunctionIndexLookup functionLookup,
                                          IFunctionInstanceLogger functionInstanceLogger,
                                          IFunctionExecutor executor)
        {
            if (queue == null)
            {
                throw new ArgumentNullException("queue");
            }

            if (queueConfiguration == null)
            {
                throw new ArgumentNullException("queueConfiguration");
            }

            if (exceptionHandler == null)
            {
                throw new ArgumentNullException("exceptionHandler");
            }

            if (trace == null)
            {
                throw new ArgumentNullException("trace");
            }

            if (functionLookup == null)
            {
                throw new ArgumentNullException("functionLookup");
            }

            if (functionInstanceLogger == null)
            {
                throw new ArgumentNullException("functionInstanceLogger");
            }

            if (executor == null)
            {
                throw new ArgumentNullException("executor");
            }

            _queue = queue;
            _queueConfiguration = queueConfiguration;
            _exceptionHandler   = exceptionHandler;
            _trace                  = trace;
            _loggerFactory          = loggerFactory;
            _functionLookup         = functionLookup;
            _functionInstanceLogger = functionInstanceLogger;
            _executor               = executor;
        }
コード例 #6
0
 public JobHostContext(IFunctionIndexLookup functionLookup,
                       IFunctionExecutor executor,
                       IListener listener,
                       TraceWriter trace,
                       IAsyncCollector <FunctionInstanceLogEntry> fastLogger = null)
 {
     _functionLookup = functionLookup;
     _executor       = executor;
     _listener       = listener;
     _trace          = trace;
     _fastLogger     = fastLogger;
 }
コード例 #7
0
 public JobHostContext(IFunctionIndexLookup functionLookup,
                       IFunctionExecutor executor,
                       IListener listener,
                       IAsyncCollector <FunctionInstanceLogEntry> eventCollector,
                       ILoggerFactory loggerFactory = null)
 {
     _functionLookup = functionLookup;
     _executor       = executor;
     _listener       = listener;
     _eventCollector = eventCollector;
     _loggerFactory  = loggerFactory;
 }
コード例 #8
0
 public JobHostContext(IFunctionIndexLookup functionLookup,
     IFunctionExecutor executor,
     IListener listener,
     TraceWriter trace,
     IAsyncCollector<FunctionInstanceLogEntry> fastLogger = null)
 {
     _functionLookup = functionLookup;
     _executor = executor;
     _listener = listener;
     _trace = trace;
     _fastLogger = fastLogger;
 }
コード例 #9
0
        public HostMessageListenerFactory(IStorageQueue queue,
                                          IQueueConfiguration queueConfiguration,
                                          IBackgroundExceptionDispatcher backgroundExceptionDispatcher,
                                          TextWriter log,
                                          IFunctionIndexLookup functionLookup,
                                          IFunctionInstanceLogger functionInstanceLogger,
                                          IFunctionExecutor executor)
        {
            if (queue == null)
            {
                throw new ArgumentNullException("queue");
            }

            if (queueConfiguration == null)
            {
                throw new ArgumentNullException("queueConfiguration");
            }

            if (backgroundExceptionDispatcher == null)
            {
                throw new ArgumentNullException("backgroundExceptionDispatcher");
            }

            if (log == null)
            {
                throw new ArgumentNullException("log");
            }

            if (functionLookup == null)
            {
                throw new ArgumentNullException("functionLookup");
            }

            if (functionInstanceLogger == null)
            {
                throw new ArgumentNullException("functionInstanceLogger");
            }

            if (executor == null)
            {
                throw new ArgumentNullException("executor");
            }

            _queue = queue;
            _queueConfiguration            = queueConfiguration;
            _backgroundExceptionDispatcher = backgroundExceptionDispatcher;
            _log                    = log;
            _functionLookup         = functionLookup;
            _functionInstanceLogger = functionInstanceLogger;
            _executor               = executor;
        }
コード例 #10
0
        public HostMessageListenerFactory(IStorageQueue queue,
            IQueueConfiguration queueConfiguration,
            IBackgroundExceptionDispatcher backgroundExceptionDispatcher,
            TextWriter log,
            IFunctionIndexLookup functionLookup,
            IFunctionInstanceLogger functionInstanceLogger,
            IFunctionExecutor executor)
        {
            if (queue == null)
            {
                throw new ArgumentNullException("queue");
            }

            if (queueConfiguration == null)
            {
                throw new ArgumentNullException("queueConfiguration");
            }

            if (backgroundExceptionDispatcher == null)
            {
                throw new ArgumentNullException("backgroundExceptionDispatcher");
            }

            if (log == null)
            {
                throw new ArgumentNullException("log");
            }

            if (functionLookup == null)
            {
                throw new ArgumentNullException("functionLookup");
            }

            if (functionInstanceLogger == null)
            {
                throw new ArgumentNullException("functionInstanceLogger");
            }

            if (executor == null)
            {
                throw new ArgumentNullException("executor");
            }

            _queue = queue;
            _queueConfiguration = queueConfiguration;
            _backgroundExceptionDispatcher = backgroundExceptionDispatcher;
            _log = log;
            _functionLookup = functionLookup;
            _functionInstanceLogger = functionInstanceLogger;
            _executor = executor;
        }
コード例 #11
0
        private static IFunctionDefinition ResolveFunctionDefinition(MethodInfo method,
                                                                     IFunctionIndexLookup functionLookup)
        {
            IFunctionDefinition function = functionLookup.Lookup(method);

            if (function == null)
            {
                string msg = String.Format(
                    "'{0}' can't be invoked from Azure WebJobs SDK. Is it missing Azure WebJobs SDK attributes?",
                    method);
                throw new InvalidOperationException(msg);
            }

            return(function);
        }
コード例 #12
0
        public HostMessageListenerFactory(IStorageQueue queue,
                                          IQueueConfiguration queueConfiguration,
                                          IWebJobsExceptionHandler exceptionHandler,
                                          ILoggerFactory loggerFactory,
                                          IFunctionIndexLookup functionLookup,
                                          IFunctionInstanceLogger functionInstanceLogger,
                                          IFunctionExecutor executor)
        {
            _queue = queue ?? throw new ArgumentNullException(nameof(queue));
            _queueConfiguration     = queueConfiguration ?? throw new ArgumentNullException(nameof(queueConfiguration));
            _exceptionHandler       = exceptionHandler ?? throw new ArgumentNullException(nameof(exceptionHandler));
            _functionLookup         = functionLookup ?? throw new ArgumentNullException(nameof(functionLookup));
            _functionInstanceLogger = functionInstanceLogger ?? throw new ArgumentNullException(nameof(functionInstanceLogger));
            _executor = executor ?? throw new ArgumentNullException(nameof(executor));

            _loggerFactory = loggerFactory;
        }
コード例 #13
0
        public HostMessageListenerFactory(
            ILoadBalancerQueue queueFactory,
            string queueName,
            IWebJobsExceptionHandler exceptionHandler,
            ILoggerFactory loggerFactory,
            IFunctionIndexLookup functionLookup,
            IFunctionInstanceLogger functionInstanceLogger,
            IFunctionExecutor executor)
        {
            _queueName              = queueName ?? throw new ArgumentNullException(nameof(queueName));
            _queueFactory           = queueFactory ?? throw new ArgumentNullException(nameof(queueFactory));
            _exceptionHandler       = exceptionHandler ?? throw new ArgumentNullException(nameof(exceptionHandler));
            _functionLookup         = functionLookup ?? throw new ArgumentNullException(nameof(functionLookup));
            _functionInstanceLogger = functionInstanceLogger ?? throw new ArgumentNullException(nameof(functionInstanceLogger));
            _executor = executor ?? throw new ArgumentNullException(nameof(executor));

            _loggerFactory = loggerFactory;
        }
コード例 #14
0
        private static IFunctionDefinition ResolveFunctionDefinition(MethodInfo method, IFunctionIndexLookup functionLookup)
        {
            IFunctionDefinition function = functionLookup.Lookup(method);

            if (function == null)
            {
                string msg = String.Format(CultureInfo.CurrentCulture, "'{0}' can't be invoked from Azure WebJobs SDK. Is it missing Azure WebJobs SDK attributes?", method);
                throw new InvalidOperationException(msg);
            }

            return function;
        }