Beispiel #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;
 }
Beispiel #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>();
 }
Beispiel #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;
 }
Beispiel #6
0
 public ODataActionSelector(IODataRoutingConvention convention,
                            IActionDescriptorsCollectionProvider actionDescriptorsCollectionProvider,
                            IActionSelectorDecisionTreeProvider decisionTreeProvider,
                            IEnumerable <IActionConstraintProvider> actionConstraintProviders,
                            ILoggerFactory loggerFactory)
 {
     _selector   = new DefaultActionSelector(actionDescriptorsCollectionProvider, decisionTreeProvider, actionConstraintProviders, loggerFactory);
     _convention = convention;
 }
 /// <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>();
 }
Beispiel #9
0
 public GoofyActionSelector(
     IActionDescriptorsCollectionProvider actionDescriptorsCollectionProvider,
     IActionSelectorDecisionTreeProvider decisionTreeProvider,
     IEnumerable <IActionConstraintProvider> actionConstraintProviders,
     ILoggerFactory loggerFactory,
     IComponentStore componentStore)
     : base(actionDescriptorsCollectionProvider, decisionTreeProvider, actionConstraintProviders, loggerFactory)
 {
     _componentStore = componentStore;
 }
Beispiel #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>();
 }
Beispiel #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>();
 }
Beispiel #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();
 }
Beispiel #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());
        }