Ejemplo n.º 1
0
 public MSApiExplorer(IMSWebApiConfiguration webApiConfiguration,
                      DynamicApiControllerManager dynamicApiControllerManager) : base(webApiConfiguration.HttpConfiguration)
 {
     _apiDescriptions             = new Lazy <Collection <ApiDescription> >(InitializeApiDescriptions);
     _webApiConfiguration         = webApiConfiguration;
     _dynamicApiControllerManager = dynamicApiControllerManager;
 }
Ejemplo n.º 2
0
        public DynamicHttpActionDescriptor(IMSWebApiConfiguration configuration,
                                           HttpControllerDescriptor controllerDescriptor,
                                           DynamicApiActionInfo actionInfo)
            : base(controllerDescriptor, actionInfo.Method)
        {
            _actionInfo          = actionInfo;
            SupportedHttpMethods = new Collection <HttpMethod> {
                actionInfo.Verb.ToHttpMethod()
            };

            Properties["__MSDynamicApiActionInfo"] = actionInfo;

            _filters    = new Lazy <Collection <IFilter> >(GetFiltersInternal, true);
            _parameters = new Lazy <Collection <HttpParameterDescriptor> >(GetParametersInternal, true);

            _attributes            = _actionInfo.Method.GetCustomAttributes(inherit: true);
            _declareOnlyAttributes = _actionInfo.Method.GetCustomAttributes(inherit: false);
        }
 public MSApiControllerActionSelector(IMSWebApiConfiguration configuration)
 {
     _configuration = configuration;
 }