public WebHookListener(WebHookDispatcher dispatcher, MethodInfo method, Uri route, ITriggeredFunctionExecutor executor)
 {
     _dispatcher = dispatcher;
     _method = method;
     _route = route;
     _executor = executor;
 }
Ejemplo n.º 2
0
 public WebHookListener(WebHookDispatcher dispatcher, ParameterInfo triggerParameter, Uri route, ITriggeredFunctionExecutor executor)
 {
     _dispatcher       = dispatcher;
     _triggerParameter = triggerParameter;
     _route            = route;
     _executor         = executor;
 }
 public WebHookListener(WebHookDispatcher dispatcher, ParameterInfo triggerParameter, Uri route, ITriggeredFunctionExecutor executor)
 {
     _dispatcher = dispatcher;
     _triggerParameter = triggerParameter;
     _route = route;
     _executor = executor;
 }
            public void Initialize(ExtensionConfigContext context)
            {
                if (context == null)
                {
                    throw new ArgumentNullException("context");
                }

                WebHookDispatcher dispatcher = new WebHookDispatcher(_webHooksConfig, context.Host, context.Config, context.Trace);
                context.Config.RegisterBindingExtension(new WebHookTriggerAttributeBindingProvider(dispatcher));
            }
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    if (_dispatcher != null)
                    {
                        _dispatcher.Dispose();
                        _dispatcher = null;
                    }
                }

                disposedValue = true;
            }
        }
Ejemplo n.º 6
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    if (_dispatcher != null)
                    {
                        _dispatcher.Dispose();
                        _dispatcher = null;
                    }
                }

                disposedValue = true;
            }
        }
        public WebHookTriggerBinding(WebHookDispatcher dispatcher, ParameterInfo parameter, bool isUserTypeBinding, WebHookTriggerAttribute attribute)
        {
            _dispatcher = dispatcher;
            _parameter = parameter;
            _isUserTypeBinding = isUserTypeBinding;
            _attribute = attribute;

            if (_isUserTypeBinding)
            {
                // Create the BindingDataProvider from the user Type. The BindingDataProvider
                // is used to define the binding parameters that the binding exposes to other
                // bindings (i.e. the properties of the POCO can be bound to by other bindings).
                // It is also used to extract the binding data from an instance of the Type.
                _bindingDataProvider = BindingDataProvider.FromType(parameter.ParameterType);
            }

            Uri baseAddress = new Uri(string.Format("http://localhost:{0}", dispatcher.Port));
            _route = FormatWebHookUri(baseAddress, attribute, parameter);
        }
Ejemplo n.º 8
0
        public WebHookTriggerBinding(WebHookDispatcher dispatcher, ParameterInfo parameter, bool isUserTypeBinding, WebHookTriggerAttribute attribute)
        {
            _dispatcher        = dispatcher;
            _parameter         = parameter;
            _isUserTypeBinding = isUserTypeBinding;
            _attribute         = attribute;

            if (_isUserTypeBinding)
            {
                // Create the BindingDataProvider from the user Type. The BindingDataProvider
                // is used to define the binding parameters that the binding exposes to other
                // bindings (i.e. the properties of the POCO can be bound to by other bindings).
                // It is also used to extract the binding data from an instance of the Type.
                _bindingDataProvider = BindingDataProvider.FromType(parameter.ParameterType);
            }

            Uri baseAddress = new Uri(string.Format("http://localhost:{0}", dispatcher.Port));

            _route = FormatWebHookUri(baseAddress, attribute, parameter);
        }
 public WebHookTriggerAttributeBindingProvider(WebHookDispatcher dispatcher)
 {
     _dispatcher = dispatcher;
 }
Ejemplo n.º 10
0
 public WebHookTriggerAttributeBindingProvider(WebHookDispatcher dispatcher)
 {
     _dispatcher = dispatcher;
 }