public ControllerActionInvoker(
            [NotNull] ActionContext actionContext,
            [NotNull] IReadOnlyList<IFilterProvider> filterProviders,
            [NotNull] IControllerFactory controllerFactory,
            [NotNull] ControllerActionDescriptor descriptor,
            [NotNull] IInputFormattersProvider inputFormatterProvider,
            [NotNull] IControllerActionArgumentBinder controllerActionArgumentBinder,
            [NotNull] IModelBinderProvider modelBinderProvider,
            [NotNull] IModelValidatorProviderProvider modelValidatorProviderProvider,
            [NotNull] IValueProviderFactoryProvider valueProviderFactoryProvider,
            [NotNull] IScopedInstance<ActionBindingContext> actionBindingContextAccessor,
            [NotNull] ITempDataDictionary tempData)
            : base(
                  actionContext, 
                  filterProviders,
                  inputFormatterProvider, 
                  modelBinderProvider, 
                  modelValidatorProviderProvider, 
                  valueProviderFactoryProvider,
                  actionBindingContextAccessor)
        {
            _descriptor = descriptor;
            _controllerFactory = controllerFactory;
            _argumentBinder = controllerActionArgumentBinder;
            _tempData = tempData;

            if (descriptor.MethodInfo == null)
            {
                throw new ArgumentException(
                    Resources.FormatPropertyOfTypeCannotBeNull("MethodInfo",
                                                               typeof(ControllerActionDescriptor)),
                    "descriptor");
            }
        }
Ejemplo n.º 2
0
        public ControllerActionInvoker(
            [NotNull] ActionContext actionContext,
            [NotNull] INestedProviderManager <FilterProviderContext> filterProvider,
            [NotNull] IControllerFactory controllerFactory,
            [NotNull] ControllerActionDescriptor descriptor,
            [NotNull] IInputFormattersProvider inputFormatterProvider,
            [NotNull] IControllerActionArgumentBinder controllerActionArgumentBinder,
            [NotNull] IModelBinderProvider modelBinderProvider,
            [NotNull] IModelValidatorProviderProvider modelValidatorProviderProvider,
            [NotNull] IValueProviderFactoryProvider valueProviderFactoryProvider,
            [NotNull] IScopedInstance <ActionBindingContext> actionBindingContextAccessor)
            : base(
                actionContext,
                filterProvider,
                inputFormatterProvider,
                modelBinderProvider,
                modelValidatorProviderProvider,
                valueProviderFactoryProvider,
                actionBindingContextAccessor)
        {
            _descriptor        = descriptor;
            _controllerFactory = controllerFactory;
            _argumentBinder    = controllerActionArgumentBinder;

            if (descriptor.MethodInfo == null)
            {
                throw new ArgumentException(
                          Resources.FormatPropertyOfTypeCannotBeNull("MethodInfo",
                                                                     typeof(ControllerActionDescriptor)),
                          "descriptor");
            }
        }
 public GenericControllerActionInvokerProvider(
     IControllerFactory controllerFactory,
     INestedProviderManager <FilterProviderContext> filterProvider,
     IControllerActionArgumentBinder argumentBinder)
 {
     _controllerFactory = controllerFactory;
     _filterProvider    = filterProvider;
     _argumentBinder    = argumentBinder;
 }
 public ControllerActionInvokerProvider(IControllerFactory controllerFactory,
                                        IInputFormattersProvider inputFormattersProvider,
                                        INestedProviderManager <FilterProviderContext> filterProvider,
                                        IControllerActionArgumentBinder actionInvocationInfoProvider)
 {
     _controllerFactory            = controllerFactory;
     _inputFormattersProvider      = inputFormattersProvider;
     _filterProvider               = filterProvider;
     _actionInvocationInfoProvider = actionInvocationInfoProvider;
 }
        public ControllerActionInvoker(
            ActionContext actionContext,
            ControllerActionInvokerCache controllerActionInvokerCache,
            IControllerFactory controllerFactory,
            ControllerActionDescriptor descriptor,
            IReadOnlyList <IInputFormatter> inputFormatters,
            IControllerActionArgumentBinder argumentBinder,
            IReadOnlyList <IModelBinder> modelBinders,
            IReadOnlyList <IModelValidatorProvider> modelValidatorProviders,
            IReadOnlyList <IValueProviderFactory> valueProviderFactories,
            ILogger logger,
            DiagnosticSource diagnosticSource,
            int maxModelValidationErrors)
            : base(
                actionContext,
                controllerActionInvokerCache,
                inputFormatters,
                modelBinders,
                modelValidatorProviders,
                valueProviderFactories,
                logger,
                diagnosticSource,
                maxModelValidationErrors)
        {
            if (controllerFactory == null)
            {
                throw new ArgumentNullException(nameof(controllerFactory));
            }

            if (descriptor == null)
            {
                throw new ArgumentNullException(nameof(descriptor));
            }

            if (argumentBinder == null)
            {
                throw new ArgumentNullException(nameof(argumentBinder));
            }

            _controllerFactory = controllerFactory;
            _descriptor        = descriptor;
            _argumentBinder    = argumentBinder;

            if (descriptor.MethodInfo == null)
            {
                throw new ArgumentException(
                          Resources.FormatPropertyOfTypeCannotBeNull(
                              nameof(descriptor.MethodInfo),
                              typeof(ControllerActionDescriptor)),
                          nameof(descriptor));
            }
        }
Ejemplo n.º 6
0
        public ControllerActionInvoker(
            ActionContext actionContext,
            ControllerActionInvokerCache controllerActionInvokerCache,
            IControllerFactory controllerFactory,
            ControllerActionDescriptor descriptor,
            IReadOnlyList<IInputFormatter> inputFormatters,
            IControllerActionArgumentBinder argumentBinder,
            IReadOnlyList<IModelValidatorProvider> modelValidatorProviders,
            IReadOnlyList<IValueProviderFactory> valueProviderFactories,
            ILogger logger,
            DiagnosticSource diagnosticSource,
            int maxModelValidationErrors)
            : base(
                  actionContext,
                  controllerActionInvokerCache,
                  inputFormatters,
                  modelValidatorProviders,
                  valueProviderFactories,
                  logger,
                  diagnosticSource,
                  maxModelValidationErrors)
        {
            if (controllerFactory == null)
            {
                throw new ArgumentNullException(nameof(controllerFactory));
            }

            if (descriptor == null)
            {
                throw new ArgumentNullException(nameof(descriptor));
            }

            if (argumentBinder == null)
            {
                throw new ArgumentNullException(nameof(argumentBinder));
            }

            _controllerFactory = controllerFactory;
            _descriptor = descriptor;
            _argumentBinder = argumentBinder;

            if (descriptor.MethodInfo == null)
            {
                throw new ArgumentException(
                    Resources.FormatPropertyOfTypeCannotBeNull(
                        nameof(descriptor.MethodInfo),
                        typeof(ControllerActionDescriptor)),
                    nameof(descriptor));
            }
        }
 public ModelBindingActionInvoker(
     ActionContext actionContext,
     ControllerActionInvokerCache controllerActionInvokerCache,
     IControllerFactory controllerFactory,
     ControllerActionDescriptor descriptor,
     IReadOnlyList <IInputFormatter> inputFormatters,
     IControllerActionArgumentBinder controllerActionArgumentBinder,
     IReadOnlyList <IModelValidatorProvider> modelValidatorProviders,
     IReadOnlyList <IValueProviderFactory> valueProviderFactories,
     ILogger logger,
     DiagnosticSource diagnosticSource,
     int maxModelValidationErrors)
     : base(actionContext, controllerActionInvokerCache, controllerFactory, descriptor, inputFormatters, controllerActionArgumentBinder, modelValidatorProviders, valueProviderFactories, logger, diagnosticSource, maxModelValidationErrors)
 {
     this.controllerActionDescriptor = descriptor;
 }
 public ModelBindingActionInvoker(
     ActionContext actionContext,
     ControllerActionInvokerCache controllerActionInvokerCache,
     IControllerFactory controllerFactory,
     ControllerActionDescriptor descriptor,
     IReadOnlyList<IInputFormatter> inputFormatters,
     IControllerActionArgumentBinder controllerActionArgumentBinder,
     IReadOnlyList<IModelValidatorProvider> modelValidatorProviders,
     IReadOnlyList<IValueProviderFactory> valueProviderFactories,
     ILogger logger,
     DiagnosticSource diagnosticSource,
     int maxModelValidationErrors)
         : base(actionContext, controllerActionInvokerCache, controllerFactory, descriptor, inputFormatters, controllerActionArgumentBinder, modelValidatorProviders, valueProviderFactories, logger, diagnosticSource, maxModelValidationErrors)
 {
     this.controllerActionDescriptor = descriptor;
 }
Ejemplo n.º 9
0
 public ControllerActionInvokerProvider(
     IControllerFactory controllerFactory,
     ControllerActionInvokerCache controllerActionInvokerCache,
     IControllerActionArgumentBinder argumentBinder,
     IOptions <MvcOptions> optionsAccessor,
     ILoggerFactory loggerFactory,
     DiagnosticSource diagnosticSource)
 {
     _controllerFactory            = controllerFactory;
     _controllerActionInvokerCache = controllerActionInvokerCache;
     _argumentBinder           = argumentBinder;
     _inputFormatters          = optionsAccessor.Value.InputFormatters.ToArray();
     _valueProviderFactories   = optionsAccessor.Value.ValueProviderFactories.ToArray();
     _maxModelValidationErrors = optionsAccessor.Value.MaxModelValidationErrors;
     _logger           = loggerFactory.CreateLogger <ControllerActionInvoker>();
     _diagnosticSource = diagnosticSource;
 }
 public ModelBindingActionInvokerFactory(
     IControllerFactory controllerFactory,
     ControllerActionInvokerCache controllerActionInvokerCache,
     IControllerActionArgumentBinder argumentBinder,
     IOptions<MvcOptions> optionsAccessor,
     ILoggerFactory loggerFactory,
     DiagnosticSource diagnosticSource)
 {
     this.controllerFactory = controllerFactory;
     this.argumentBinder = argumentBinder;
     this.controllerActionInvokerCache = controllerActionInvokerCache;
     this.inputFormatters = optionsAccessor.Value.InputFormatters.ToArray();
     this.modelValidatorProviders = optionsAccessor.Value.ModelValidatorProviders.ToArray();
     this.valueProviderFactories = optionsAccessor.Value.ValueProviderFactories.ToArray();
     this.maxModelValidationErrors = optionsAccessor.Value.MaxModelValidationErrors;
     this.logger = loggerFactory.CreateLogger<ControllerActionInvoker>();
     this.diagnosticSource = diagnosticSource;
 }
Ejemplo n.º 11
0
 public ModelBindingActionInvokerFactory(
     IControllerFactory controllerFactory,
     ControllerActionInvokerCache controllerActionInvokerCache,
     IControllerActionArgumentBinder argumentBinder,
     IOptions <MvcOptions> optionsAccessor,
     ILoggerFactory loggerFactory,
     DiagnosticSource diagnosticSource)
 {
     this.controllerFactory            = controllerFactory;
     this.argumentBinder               = argumentBinder;
     this.controllerActionInvokerCache = controllerActionInvokerCache;
     this.inputFormatters              = optionsAccessor.Value.InputFormatters.ToArray();
     this.modelValidatorProviders      = optionsAccessor.Value.ModelValidatorProviders.ToArray();
     this.valueProviderFactories       = optionsAccessor.Value.ValueProviderFactories.ToArray();
     this.maxModelValidationErrors     = optionsAccessor.Value.MaxModelValidationErrors;
     this.logger           = loggerFactory.CreateLogger <ControllerActionInvoker>();
     this.diagnosticSource = diagnosticSource;
 }
Ejemplo n.º 12
0
 public ControllerActionInvokerProvider(
     IControllerFactory controllerFactory,
     IInputFormattersProvider inputFormattersProvider,
     INestedProviderManager <FilterProviderContext> filterProvider,
     IControllerActionArgumentBinder argumentBinder,
     IModelBinderProvider modelBinderProvider,
     IModelValidatorProviderProvider modelValidationProviderProvider,
     IValueProviderFactoryProvider valueProviderFactoryProvider,
     IScopedInstance <ActionBindingContext> actionBindingContextAccessor)
 {
     _controllerFactory               = controllerFactory;
     _inputFormattersProvider         = inputFormattersProvider;
     _filterProvider                  = filterProvider;
     _argumentBinder                  = argumentBinder;
     _modelBinderProvider             = modelBinderProvider;
     _modelValidationProviderProvider = modelValidationProviderProvider;
     _valueProviderFactoryProvider    = valueProviderFactoryProvider;
     _actionBindingContextAccessor    = actionBindingContextAccessor;
 }
 public ControllerActionInvokerProvider(
     IControllerFactory controllerFactory,
     IEnumerable<IFilterProvider> filterProviders,
     IControllerActionArgumentBinder argumentBinder,
     IOptions<MvcOptions> optionsAccessor,
     ILoggerFactory loggerFactory,
     DiagnosticSource diagnosticSource)
 {
     _controllerFactory = controllerFactory;
     _filterProviders = filterProviders.OrderBy(item => item.Order).ToArray();
     _argumentBinder = argumentBinder;
     _inputFormatters = optionsAccessor.Value.InputFormatters.ToArray();
     _modelBinders = optionsAccessor.Value.ModelBinders.ToArray();
     _modelValidatorProviders = optionsAccessor.Value.ModelValidatorProviders.ToArray();
     _valueProviderFactories = optionsAccessor.Value.ValueProviderFactories.ToArray();
     _maxModelValidationErrors = optionsAccessor.Value.MaxModelValidationErrors;
     _logger = loggerFactory.CreateLogger<ControllerActionInvoker>();
     _diagnosticSource = diagnosticSource;
 }
 public ControllerActionInvokerProvider(
     IControllerFactory controllerFactory,
     IEnumerable <IFilterProvider> filterProviders,
     IControllerActionArgumentBinder argumentBinder,
     IOptions <MvcOptions> optionsAccessor,
     ILoggerFactory loggerFactory,
     DiagnosticSource diagnosticSource)
 {
     _controllerFactory        = controllerFactory;
     _filterProviders          = filterProviders.OrderBy(item => item.Order).ToArray();
     _argumentBinder           = argumentBinder;
     _inputFormatters          = optionsAccessor.Value.InputFormatters.ToArray();
     _modelBinders             = optionsAccessor.Value.ModelBinders.ToArray();
     _modelValidatorProviders  = optionsAccessor.Value.ModelValidatorProviders.ToArray();
     _valueProviderFactories   = optionsAccessor.Value.ValueProviderFactories.ToArray();
     _maxModelValidationErrors = optionsAccessor.Value.MaxModelValidationErrors;
     _logger           = loggerFactory.CreateLogger <ControllerActionInvoker>();
     _diagnosticSource = diagnosticSource;
 }
Ejemplo n.º 15
0
 public ControllerActionInvoker([NotNull] ActionContext actionContext,
                                [NotNull] INestedProviderManager <FilterProviderContext> filterProvider,
                                [NotNull] IControllerFactory controllerFactory,
                                [NotNull] ControllerActionDescriptor descriptor,
                                [NotNull] IInputFormattersProvider inputFormattersProvider,
                                [NotNull] IControllerActionArgumentBinder controllerActionArgumentBinder)
     : base(actionContext, filterProvider)
 {
     _descriptor               = descriptor;
     _controllerFactory        = controllerFactory;
     _inputFormattersProvider  = inputFormattersProvider;
     _actionInvocationProvider = controllerActionArgumentBinder;
     if (descriptor.MethodInfo == null)
     {
         throw new ArgumentException(
                   Resources.FormatPropertyOfTypeCannotBeNull("MethodInfo",
                                                              typeof(ControllerActionDescriptor)),
                   "descriptor");
     }
 }
 public ControllerActionInvokerProvider(
     IControllerFactory controllerFactory,
     IInputFormattersProvider inputFormattersProvider,
     IEnumerable<IFilterProvider> filterProviders,
     IControllerActionArgumentBinder argumentBinder,
     IModelBinderProvider modelBinderProvider,
     IModelValidatorProviderProvider modelValidationProviderProvider,
     IValueProviderFactoryProvider valueProviderFactoryProvider,
     IScopedInstance<ActionBindingContext> actionBindingContextAccessor,
     ITempDataDictionary tempData)
 {
     _controllerFactory = controllerFactory;
     _inputFormattersProvider = inputFormattersProvider;
     _filterProviders = filterProviders.OrderBy(item => item.Order).ToArray();
     _argumentBinder = argumentBinder;
     _modelBinderProvider = modelBinderProvider;
     _modelValidationProviderProvider = modelValidationProviderProvider;
     _valueProviderFactoryProvider = valueProviderFactoryProvider;
     _actionBindingContextAccessor = actionBindingContextAccessor;
     _tempData = tempData;
 }
Ejemplo n.º 17
0
 public ControllerActionInvokerProvider(
     IControllerFactory controllerFactory,
     IInputFormattersProvider inputFormattersProvider,
     IEnumerable <IFilterProvider> filterProviders,
     IControllerActionArgumentBinder argumentBinder,
     IModelBinderProvider modelBinderProvider,
     IModelValidatorProviderProvider modelValidationProviderProvider,
     IValueProviderFactoryProvider valueProviderFactoryProvider,
     IScopedInstance <ActionBindingContext> actionBindingContextAccessor,
     ITempDataDictionary tempData)
 {
     _controllerFactory               = controllerFactory;
     _inputFormattersProvider         = inputFormattersProvider;
     _filterProviders                 = filterProviders.OrderBy(item => item.Order).ToArray();
     _argumentBinder                  = argumentBinder;
     _modelBinderProvider             = modelBinderProvider;
     _modelValidationProviderProvider = modelValidationProviderProvider;
     _valueProviderFactoryProvider    = valueProviderFactoryProvider;
     _actionBindingContextAccessor    = actionBindingContextAccessor;
     _tempData = tempData;
 }
        public ControllerActionInvoker(
            [NotNull] ActionContext actionContext,
            [NotNull] IReadOnlyList <IFilterProvider> filterProviders,
            [NotNull] IControllerFactory controllerFactory,
            [NotNull] ControllerActionDescriptor descriptor,
            [NotNull] IReadOnlyList <IInputFormatter> inputFormatters,
            [NotNull] IReadOnlyList <IOutputFormatter> outputFormatters,
            [NotNull] IControllerActionArgumentBinder controllerActionArgumentBinder,
            [NotNull] IReadOnlyList <IModelBinder> modelBinders,
            [NotNull] IReadOnlyList <IModelValidatorProvider> modelValidatorProviders,
            [NotNull] IReadOnlyList <IValueProviderFactory> valueProviderFactories,
            [NotNull] IScopedInstance <ActionBindingContext> actionBindingContextAccessor,
            [NotNull] ITempDataDictionary tempData,
            [NotNull] ILoggerFactory loggerFactory,
            int maxModelValidationErrors)
            : base(
                actionContext,
                filterProviders,
                inputFormatters,
                outputFormatters,
                modelBinders,
                modelValidatorProviders,
                valueProviderFactories,
                actionBindingContextAccessor,
                loggerFactory,
                maxModelValidationErrors)
        {
            _descriptor        = descriptor;
            _controllerFactory = controllerFactory;
            _argumentBinder    = controllerActionArgumentBinder;
            _tempData          = tempData;

            if (descriptor.MethodInfo == null)
            {
                throw new ArgumentException(
                          Resources.FormatPropertyOfTypeCannotBeNull("MethodInfo",
                                                                     typeof(ControllerActionDescriptor)),
                          "descriptor");
            }
        }
Ejemplo n.º 19
0
        public ControllerActionInvoker(
            [NotNull] ActionContext actionContext,
            [NotNull] IReadOnlyList<IFilterProvider> filterProviders,
            [NotNull] IControllerFactory controllerFactory,
            [NotNull] ControllerActionDescriptor descriptor,
            [NotNull] IReadOnlyList<IInputFormatter> inputFormatters,
            [NotNull] IReadOnlyList<IOutputFormatter> outputFormatters,
            [NotNull] IControllerActionArgumentBinder controllerActionArgumentBinder,
            [NotNull] IReadOnlyList<IModelBinder> modelBinders,
            [NotNull] IReadOnlyList<IModelValidatorProvider> modelValidatorProviders,
            [NotNull] IReadOnlyList<IValueProviderFactory> valueProviderFactories,
            [NotNull] IActionBindingContextAccessor actionBindingContextAccessor,
            [NotNull] ILogger logger,
            [NotNull] INotifier notifier,
            int maxModelValidationErrors)
            : base(
                  actionContext,
                  filterProviders,
                  inputFormatters,
                  outputFormatters,
                  modelBinders,
                  modelValidatorProviders,
                  valueProviderFactories,
                  actionBindingContextAccessor,
                  logger,
                  notifier,
                  maxModelValidationErrors)
        {
            _descriptor = descriptor;
            _controllerFactory = controllerFactory;
            _argumentBinder = controllerActionArgumentBinder;

            if (descriptor.MethodInfo == null)
            {
                throw new ArgumentException(
                    Resources.FormatPropertyOfTypeCannotBeNull("MethodInfo",
                                                               typeof(ControllerActionDescriptor)),
                    "descriptor");
            }
        }
 public ControllerActionInvokerProvider(
     IControllerFactory controllerFactory,
     IEnumerable<IFilterProvider> filterProviders,
     IControllerActionArgumentBinder argumentBinder,
     IOptions<MvcOptions> optionsAccessor,
     IActionBindingContextAccessor actionBindingContextAccessor,
     ILoggerFactory loggerFactory,
     INotifier notifier)
 {
     _controllerFactory = controllerFactory;
     _filterProviders = filterProviders.OrderBy(item => item.Order).ToArray();
     _argumentBinder = argumentBinder;
     _inputFormatters = optionsAccessor.Options.InputFormatters.ToArray();
     _outputFormatters = optionsAccessor.Options.OutputFormatters.ToArray();
     _modelBinders = optionsAccessor.Options.ModelBinders.ToArray();
     _modelValidatorProviders = optionsAccessor.Options.ModelValidatorProviders.ToArray();
     _valueProviderFactories = optionsAccessor.Options.ValueProviderFactories.ToArray();
     _actionBindingContextAccessor = actionBindingContextAccessor;
     _maxModelValidationErrors = optionsAccessor.Options.MaxModelValidationErrors;
     _logger = loggerFactory.CreateLogger<ControllerActionInvoker>();
     _notifier = notifier;
 }
 public ControllerActionInvokerProvider(
     IControllerFactory controllerFactory,
     IEnumerable <IFilterProvider> filterProviders,
     IControllerActionArgumentBinder argumentBinder,
     IOptions <MvcOptions> optionsAccessor,
     IActionBindingContextAccessor actionBindingContextAccessor,
     ILoggerFactory loggerFactory,
     INotifier notifier)
 {
     _controllerFactory            = controllerFactory;
     _filterProviders              = filterProviders.OrderBy(item => item.Order).ToArray();
     _argumentBinder               = argumentBinder;
     _inputFormatters              = optionsAccessor.Options.InputFormatters.ToArray();
     _outputFormatters             = optionsAccessor.Options.OutputFormatters.ToArray();
     _modelBinders                 = optionsAccessor.Options.ModelBinders.ToArray();
     _modelValidatorProviders      = optionsAccessor.Options.ModelValidatorProviders.ToArray();
     _valueProviderFactories       = optionsAccessor.Options.ValueProviderFactories.ToArray();
     _actionBindingContextAccessor = actionBindingContextAccessor;
     _maxModelValidationErrors     = optionsAccessor.Options.MaxModelValidationErrors;
     _logger   = loggerFactory.CreateLogger <ControllerActionInvoker>();
     _notifier = notifier;
 }
 public ControllerActionInvokerProvider(
     IControllerFactory controllerFactory,
     IEnumerable<IFilterProvider> filterProviders,
     IControllerActionArgumentBinder argumentBinder,
     IOptions<MvcOptions> optionsAccessor,
     IScopedInstance<ActionBindingContext> actionBindingContextAccessor,
     ITempDataDictionary tempData,
     ILoggerFactory loggerFactory)
 {
     _controllerFactory = controllerFactory;
     _filterProviders = filterProviders.OrderBy(item => item.Order).ToArray();
     _argumentBinder = argumentBinder;
     _inputFormatters = optionsAccessor.Options.InputFormatters.ToArray();
     _outputFormatters = optionsAccessor.Options.OutputFormatters.ToArray();
     _modelBinders = optionsAccessor.Options.ModelBinders.ToArray();
     _modelValidatorProviders = optionsAccessor.Options.ModelValidatorProviders.ToArray();
     _valueProviderFactories = optionsAccessor.Options.ValueProviderFactories.ToArray();
     _actionBindingContextAccessor = actionBindingContextAccessor;
     _tempData = tempData;
     _maxModelValidationErrors = optionsAccessor.Options.MaxModelValidationErrors;
     _loggerFactory = loggerFactory;
 }
Ejemplo n.º 23
0
 public ControllerActionInvokerProvider(
     IControllerFactory controllerFactory,
     IEnumerable <IFilterProvider> filterProviders,
     IControllerActionArgumentBinder argumentBinder,
     IOptions <MvcOptions> optionsAccessor,
     IScopedInstance <ActionBindingContext> actionBindingContextAccessor,
     ITempDataDictionary tempData,
     ILoggerFactory loggerFactory)
 {
     _controllerFactory            = controllerFactory;
     _filterProviders              = filterProviders.OrderBy(item => item.Order).ToArray();
     _argumentBinder               = argumentBinder;
     _inputFormatters              = optionsAccessor.Options.InputFormatters.ToArray();
     _outputFormatters             = optionsAccessor.Options.OutputFormatters.ToArray();
     _modelBinders                 = optionsAccessor.Options.ModelBinders.ToArray();
     _modelValidatorProviders      = optionsAccessor.Options.ModelValidatorProviders.ToArray();
     _valueProviderFactories       = optionsAccessor.Options.ValueProviderFactories.ToArray();
     _actionBindingContextAccessor = actionBindingContextAccessor;
     _tempData = tempData;
     _maxModelValidationErrors = optionsAccessor.Options.MaxModelValidationErrors;
     _loggerFactory            = loggerFactory;
 }
 public TestControllerActionInvoker(
     ActionContext actionContext,
     IFilterProvider[] filterProvider,
     MockControllerFactory controllerFactory,
     ControllerActionDescriptor descriptor,
     IReadOnlyList<IInputFormatter> inputFormatters,
     IControllerActionArgumentBinder controllerActionArgumentBinder,
     IReadOnlyList<IModelBinder> modelBinders,
     IReadOnlyList<IModelValidatorProvider> modelValidatorProviders,
     IReadOnlyList<IValueProviderFactory> valueProviderFactories,
     ILogger logger,
     DiagnosticSource diagnosticSource,
     int maxAllowedErrorsInModelState)
     : base(
           actionContext,
           filterProvider,
           controllerFactory,
           descriptor,
           inputFormatters,
           controllerActionArgumentBinder,
           modelBinders,
           modelValidatorProviders,
           valueProviderFactories,
           logger,
           diagnosticSource,
           maxAllowedErrorsInModelState)
 {
     ControllerFactory = controllerFactory;
 }
 public TestControllerActionInvoker(
     ActionContext actionContext,
     IFilterProvider[] filterProvider,
     MockControllerFactory controllerFactory,
     ControllerActionDescriptor descriptor,
     IInputFormattersProvider inputFormattersProvider,
     IControllerActionArgumentBinder controllerActionArgumentBinder,
     IModelBinderProvider modelBinderProvider,
     IModelValidatorProviderProvider modelValidatorProviderProvider,
     IValueProviderFactoryProvider valueProviderFactoryProvider,
     IScopedInstance<ActionBindingContext> actionBindingContext,
     ITempDataDictionary tempData)
     : base(
           actionContext,
           filterProvider,
           controllerFactory,
           descriptor,
           inputFormattersProvider,
           controllerActionArgumentBinder,
           modelBinderProvider,
           modelValidatorProviderProvider,
           valueProviderFactoryProvider,
           actionBindingContext,
           tempData)
 {
     ControllerFactory = controllerFactory;
 }
 public TestControllerActionInvoker(
     ActionContext actionContext,
     IFilterProvider[] filterProvider,
     MockControllerFactory controllerFactory,
     ControllerActionDescriptor descriptor,
     IReadOnlyList<IInputFormatter> inputFormatters,
     IReadOnlyList<IOutputFormatter> outputFormatters,
     IControllerActionArgumentBinder controllerActionArgumentBinder,
     IReadOnlyList<IModelBinder> modelBinders,
     IReadOnlyList<IModelValidatorProvider> modelValidatorProviders,
     IReadOnlyList<IValueProviderFactory> valueProviderFactories,
     IScopedInstance<ActionBindingContext> actionBindingContext,
     ITempDataDictionary tempData,
     ILoggerFactory loggerFactory,
     int maxAllowedErrorsInModelState)
     : base(
           actionContext,
           filterProvider,
           controllerFactory,
           descriptor,
           inputFormatters,
           outputFormatters,
           controllerActionArgumentBinder,
           modelBinders,
           modelValidatorProviders,
           valueProviderFactories,
           actionBindingContext,
           tempData,
           loggerFactory,
           maxAllowedErrorsInModelState)
 {
     ControllerFactory = controllerFactory;
 }
Ejemplo n.º 27
0
 public TestControllerActionInvoker(
     ActionContext actionContext,
     IFilterProvider[] filterProvider,
     MockControllerFactory controllerFactory,
     ControllerActionDescriptor descriptor,
     IReadOnlyList<IInputFormatter> inputFormatters,
     IReadOnlyList<IOutputFormatter> outputFormatters,
     IControllerActionArgumentBinder controllerActionArgumentBinder,
     IReadOnlyList<IModelBinder> modelBinders,
     IReadOnlyList<IModelValidatorProvider> modelValidatorProviders,
     IReadOnlyList<IValueProviderFactory> valueProviderFactories,
     IActionBindingContextAccessor actionBindingContext,
     ILogger logger,
     TelemetrySource telemetry,
     int maxAllowedErrorsInModelState)
     : base(
           actionContext,
           filterProvider,
           controllerFactory,
           descriptor,
           inputFormatters,
           outputFormatters,
           controllerActionArgumentBinder,
           modelBinders,
           modelValidatorProviders,
           valueProviderFactories,
           actionBindingContext,
           logger,
           telemetry,
           maxAllowedErrorsInModelState)
 {
     ControllerFactory = controllerFactory;
 }
Ejemplo n.º 28
0
        public ControllerActionInvoker(
            ActionContext actionContext,
            IReadOnlyList <IFilterProvider> filterProviders,
            IControllerFactory controllerFactory,
            ControllerActionDescriptor descriptor,
            IReadOnlyList <IInputFormatter> inputFormatters,
            IReadOnlyList <IOutputFormatter> outputFormatters,
            IControllerActionArgumentBinder controllerActionArgumentBinder,
            IReadOnlyList <IModelBinder> modelBinders,
            IReadOnlyList <IModelValidatorProvider> modelValidatorProviders,
            IReadOnlyList <IValueProviderFactory> valueProviderFactories,
            IActionBindingContextAccessor actionBindingContextAccessor,
            ILogger logger,
            DiagnosticSource diagnosticSource,
            int maxModelValidationErrors)
            : base(
                actionContext,
                filterProviders,
                inputFormatters,
                outputFormatters,
                modelBinders,
                modelValidatorProviders,
                valueProviderFactories,
                actionBindingContextAccessor,
                logger,
                diagnosticSource,
                maxModelValidationErrors)
        {
            if (actionContext == null)
            {
                throw new ArgumentNullException(nameof(actionContext));
            }

            if (filterProviders == null)
            {
                throw new ArgumentNullException(nameof(filterProviders));
            }

            if (controllerFactory == null)
            {
                throw new ArgumentNullException(nameof(controllerFactory));
            }

            if (descriptor == null)
            {
                throw new ArgumentNullException(nameof(descriptor));
            }

            if (inputFormatters == null)
            {
                throw new ArgumentNullException(nameof(inputFormatters));
            }

            if (outputFormatters == null)
            {
                throw new ArgumentNullException(nameof(outputFormatters));
            }

            if (controllerActionArgumentBinder == null)
            {
                throw new ArgumentNullException(nameof(controllerActionArgumentBinder));
            }

            if (modelBinders == null)
            {
                throw new ArgumentNullException(nameof(modelBinders));
            }

            if (modelValidatorProviders == null)
            {
                throw new ArgumentNullException(nameof(modelValidatorProviders));
            }

            if (valueProviderFactories == null)
            {
                throw new ArgumentNullException(nameof(valueProviderFactories));
            }

            if (actionBindingContextAccessor == null)
            {
                throw new ArgumentNullException(nameof(actionBindingContextAccessor));
            }

            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            if (diagnosticSource == null)
            {
                throw new ArgumentNullException(nameof(diagnosticSource));
            }

            _descriptor        = descriptor;
            _controllerFactory = controllerFactory;
            _argumentBinder    = controllerActionArgumentBinder;

            if (descriptor.MethodInfo == null)
            {
                throw new ArgumentException(
                          Resources.FormatPropertyOfTypeCannotBeNull("MethodInfo",
                                                                     typeof(ControllerActionDescriptor)),
                          "descriptor");
            }
        }
Ejemplo n.º 29
0
        public ControllerActionInvoker(
            ActionContext actionContext,
            IReadOnlyList<IFilterProvider> filterProviders,
            IControllerFactory controllerFactory,
            ControllerActionDescriptor descriptor,
            IReadOnlyList<IInputFormatter> inputFormatters,
            IReadOnlyList<IOutputFormatter> outputFormatters,
            IControllerActionArgumentBinder controllerActionArgumentBinder,
            IReadOnlyList<IModelBinder> modelBinders,
            IReadOnlyList<IModelValidatorProvider> modelValidatorProviders,
            IReadOnlyList<IValueProviderFactory> valueProviderFactories,
            IActionBindingContextAccessor actionBindingContextAccessor,
            ILogger logger,
            DiagnosticSource diagnosticSource,
            int maxModelValidationErrors)
            : base(
                  actionContext,
                  filterProviders,
                  inputFormatters,
                  outputFormatters,
                  modelBinders,
                  modelValidatorProviders,
                  valueProviderFactories,
                  actionBindingContextAccessor,
                  logger,
                  diagnosticSource,
                  maxModelValidationErrors)
        {
            if (actionContext == null)
            {
                throw new ArgumentNullException(nameof(actionContext));
            }

            if (filterProviders == null)
            {
                throw new ArgumentNullException(nameof(filterProviders));
            }

            if (controllerFactory == null)
            {
                throw new ArgumentNullException(nameof(controllerFactory));
            }

            if (descriptor == null)
            {
                throw new ArgumentNullException(nameof(descriptor));
            }

            if (inputFormatters == null)
            {
                throw new ArgumentNullException(nameof(inputFormatters));
            }

            if (outputFormatters == null)
            {
                throw new ArgumentNullException(nameof(outputFormatters));
            }

            if (controllerActionArgumentBinder == null)
            {
                throw new ArgumentNullException(nameof(controllerActionArgumentBinder));
            }

            if (modelBinders == null)
            {
                throw new ArgumentNullException(nameof(modelBinders));
            }

            if (modelValidatorProviders == null)
            {
                throw new ArgumentNullException(nameof(modelValidatorProviders));
            }

            if (valueProviderFactories == null)
            {
                throw new ArgumentNullException(nameof(valueProviderFactories));
            }

            if (actionBindingContextAccessor == null)
            {
                throw new ArgumentNullException(nameof(actionBindingContextAccessor));
            }

            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            if (diagnosticSource == null)
            {
                throw new ArgumentNullException(nameof(diagnosticSource));
            }

            _descriptor = descriptor;
            _controllerFactory = controllerFactory;
            _argumentBinder = controllerActionArgumentBinder;

            if (descriptor.MethodInfo == null)
            {
                throw new ArgumentException(
                    Resources.FormatPropertyOfTypeCannotBeNull("MethodInfo",
                                                               typeof(ControllerActionDescriptor)),
                    "descriptor");
            }
        }