Esempio n. 1
0
 public TestApiVersionActionSelector(
     IActionSelectorDecisionTreeProvider decisionTreeProvider,
     ActionConstraintCache actionConstraintCache,
     IOptions <ApiVersioningOptions> options,
     ILoggerFactory loggerFactory)
     : base(decisionTreeProvider, actionConstraintCache, options, loggerFactory)
 {
 }
 /// <param name="decisionTreeProvider"></param>
 public ODataActionSelector(IServiceProvider serviceProvider,
                            IActionSelectorDecisionTreeProvider decisionTreeProvider,
                            ActionConstraintCache actionConstraintProviders,
                            ILoggerFactory loggerFactory)
 {
     _serviceProvider = serviceProvider;
     _selector        = new ActionSelector(decisionTreeProvider, actionConstraintProviders, loggerFactory);
 }
 public ODataActionSelector(IODataRoutingConvention convention,
     IActionDescriptorsCollectionProvider actionDescriptorsCollectionProvider,
     IActionSelectorDecisionTreeProvider decisionTreeProvider,
     IEnumerable<IActionConstraintProvider> actionConstraintProviders,
     ILoggerFactory loggerFactory)
 {
     _selector = new DefaultActionSelector(actionDescriptorsCollectionProvider, decisionTreeProvider, actionConstraintProviders, loggerFactory);
     _convention = convention;
 }
Esempio n. 4
0
 /// <summary>
 /// Creates a new <see cref="DefaultActionSelector"/>.
 /// </summary>
 /// <param name="decisionTreeProvider">The <see cref="IActionSelectorDecisionTreeProvider"/>.</param>
 /// <param name="actionConstraintProviders">The set of <see cref="IActionInvokerProvider"/> instances.</param>
 /// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param>
 public DefaultActionSelector(
     IActionSelectorDecisionTreeProvider decisionTreeProvider,
     IEnumerable <IActionConstraintProvider> actionConstraintProviders,
     ILoggerFactory loggerFactory)
 {
     _decisionTreeProvider      = decisionTreeProvider;
     _actionConstraintProviders = actionConstraintProviders.OrderBy(item => item.Order).ToArray();
     _logger = loggerFactory.CreateLogger <DefaultActionSelector>();
 }
Esempio n. 5
0
 /// <summary>
 /// Creates a new <see cref="ActionSelector"/>.
 /// </summary>
 /// <param name="decisionTreeProvider">The <see cref="IActionSelectorDecisionTreeProvider"/>.</param>
 /// <param name="actionConstraintCache">The <see cref="ActionConstraintCache"/> that
 /// providers a set of <see cref="IActionConstraint"/> instances.</param>
 /// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param>
 public ActionSelector(
     IActionSelectorDecisionTreeProvider decisionTreeProvider,
     ActionConstraintCache actionConstraintCache,
     ILoggerFactory loggerFactory)
 {
     _decisionTreeProvider = decisionTreeProvider;
     _logger = loggerFactory.CreateLogger<ActionSelector>();
     _actionConstraintCache = actionConstraintCache;
 }
Esempio n. 6
0
 public ODataActionSelector(IODataRoutingConvention convention,
                            IActionDescriptorsCollectionProvider actionDescriptorsCollectionProvider,
                            IActionSelectorDecisionTreeProvider decisionTreeProvider,
                            IEnumerable <IActionConstraintProvider> actionConstraintProviders,
                            ILoggerFactory loggerFactory)
 {
     _selector   = new DefaultActionSelector(actionDescriptorsCollectionProvider, decisionTreeProvider, actionConstraintProviders, loggerFactory);
     _convention = convention;
 }
Esempio n. 7
0
 /// <summary>
 /// Creates a new <see cref="ActionSelector"/>.
 /// </summary>
 /// <param name="decisionTreeProvider">The <see cref="IActionSelectorDecisionTreeProvider"/>.</param>
 /// <param name="actionConstraintCache">The <see cref="ActionConstraintCache"/> that
 /// providers a set of <see cref="IActionConstraint"/> instances.</param>
 /// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param>
 public ActionSelector(
     IActionSelectorDecisionTreeProvider decisionTreeProvider,
     ActionConstraintCache actionConstraintCache,
     ILoggerFactory loggerFactory)
 {
     _decisionTreeProvider = decisionTreeProvider;
     _logger = loggerFactory.CreateLogger <ActionSelector>();
     _actionConstraintCache = actionConstraintCache;
 }
 /// <summary>
 /// Creates a new <see cref="DefaultActionSelector"/>.
 /// </summary>
 /// <param name="decisionTreeProvider">The <see cref="IActionSelectorDecisionTreeProvider"/>.</param>
 /// <param name="actionConstraintProviders">The set of <see cref="IActionInvokerProvider"/> instances.</param>
 /// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param>
 public DefaultActionSelector(
     IActionSelectorDecisionTreeProvider decisionTreeProvider,
     IEnumerable<IActionConstraintProvider> actionConstraintProviders,
     ILoggerFactory loggerFactory)
 {
     _decisionTreeProvider = decisionTreeProvider;
     _actionConstraintProviders = actionConstraintProviders.OrderBy(item => item.Order).ToArray();
     _logger = loggerFactory.CreateLogger<DefaultActionSelector>();
 }
Esempio n. 9
0
 public GoofyActionSelector(
     IActionDescriptorsCollectionProvider actionDescriptorsCollectionProvider,
     IActionSelectorDecisionTreeProvider decisionTreeProvider,
     IEnumerable <IActionConstraintProvider> actionConstraintProviders,
     ILoggerFactory loggerFactory,
     IComponentStore componentStore)
     : base(actionDescriptorsCollectionProvider, decisionTreeProvider, actionConstraintProviders, loggerFactory)
 {
     _componentStore = componentStore;
 }
Esempio n. 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ApiVersionActionSelector"/> class.
 /// </summary>
 /// <param name="decisionTreeProvider">The <see cref="IActionSelectorDecisionTreeProvider"/> used to select candidate routes.</param>
 /// <param name="actionConstraintCache">The <see cref="ActionConstraintCache"/> that providers a set of <see cref="IActionConstraint"/> instances.</param>
 /// <param name="options">The <see cref="ApiVersioningOptions">options</see> associated with the action selector.</param>
 /// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param>
 public ApiVersionActionSelector(
     IActionSelectorDecisionTreeProvider decisionTreeProvider,
     ActionConstraintCache actionConstraintCache,
     IOptions <ApiVersioningOptions> options,
     ILoggerFactory loggerFactory)
 {
     this.decisionTreeProvider  = decisionTreeProvider;
     this.actionConstraintCache = actionConstraintCache;
     this.options = options;
     logger       = loggerFactory.CreateLogger <ApiVersionActionSelector>();
 }
Esempio n. 11
0
 public DefaultActionSelector(
     [NotNull] IActionDescriptorsCollectionProvider actionDescriptorsCollectionProvider,
     [NotNull] IActionSelectorDecisionTreeProvider decisionTreeProvider,
     [NotNull] INestedProviderManager <ActionConstraintProviderContext> actionConstraintProvider,
     [NotNull] ILoggerFactory loggerFactory)
 {
     _actionDescriptorsCollectionProvider = actionDescriptorsCollectionProvider;
     _decisionTreeProvider     = decisionTreeProvider;
     _actionConstraintProvider = actionConstraintProvider;
     _logger = loggerFactory.Create <DefaultActionSelector>();
 }
Esempio n. 12
0
 public DefaultActionSelector(
     [NotNull] IActionDescriptorsCollectionProvider actionDescriptorsCollectionProvider,
     [NotNull] IActionSelectorDecisionTreeProvider decisionTreeProvider,
     [NotNull] IActionBindingContextProvider bindingProvider,
     [NotNull] ILoggerFactory loggerFactory)
 {
     _actionDescriptorsCollectionProvider = actionDescriptorsCollectionProvider;
     _decisionTreeProvider = decisionTreeProvider;
     _bindingProvider      = bindingProvider;
     _logger = loggerFactory.Create <DefaultActionSelector>();
 }
 public WebSocketRouteHandler(
     IActionSelectorDecisionTreeProvider decisionTreeProvider,
     IControllerFactory controllerFactory,
     ControllerActionInvokerCache cache,
     IWebSocketControllerArgumentBinder argumentBinder,
     IOptions <MvcOptions> optionsAccessor)
 {
     DecisionTree           = decisionTreeProvider.DecisionTree;
     ControllerFactory      = controllerFactory;
     Cache                  = cache;
     ArgumentBinder         = argumentBinder;
     ValueProviderFactories = optionsAccessor.Value.ValueProviderFactories.ToArray();
 }
Esempio n. 14
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ApiVersionActionSelector"/> class.
        /// </summary>
        /// <param name="decisionTreeProvider">The <see cref="IActionSelectorDecisionTreeProvider"/> used to select candidate routes.</param>
        /// <param name="actionConstraintCache">The <see cref="ActionConstraintCache"/> that providers a set of <see cref="IActionConstraint"/> instances.</param>
        /// <param name="options">The <see cref="ApiVersioningOptions">options</see> associated with the action selector.</param>
        /// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param>
        public ApiVersionActionSelector(
            IActionSelectorDecisionTreeProvider decisionTreeProvider,
            ActionConstraintCache actionConstraintCache,
            IOptions <ApiVersioningOptions> options,
            ILoggerFactory loggerFactory)
        {
            Arg.NotNull(decisionTreeProvider, nameof(decisionTreeProvider));
            Arg.NotNull(actionConstraintCache, nameof(actionConstraintCache));
            Arg.NotNull(options, nameof(options));
            Arg.NotNull(loggerFactory, nameof(loggerFactory));

            this.decisionTreeProvider  = decisionTreeProvider;
            this.actionConstraintCache = actionConstraintCache;
            this.options = options;
            Logger       = loggerFactory.CreateLogger(GetType());
        }