コード例 #1
0
        public ApiVersionControllerSelector(HttpConfiguration configuration, IApiVersionResolver apiVersionResolver, INoApiVersionResolver noApiVersionResolver) : base(configuration)
        {
            _config               = configuration;
            _apiVersionResolver   = apiVersionResolver;
            _noApiVersionResolver = noApiVersionResolver;

            _apiVersionAssemblies  = new Lazy <IEnumerable <Assembly> >(ResolveApiVersionAssemblies);
            _controllerDescriptors = new Lazy <Dictionary <string, HttpControllerDescriptor> >(InitializeControllerDescriptors);
        }
コード例 #2
0
 public static void Configure(HttpConfiguration config, IApiVersionResolver apiVersionResolver, INoApiVersionResolver noApiVersionResolver)
 {
     config.Services.Replace(typeof(IHttpControllerSelector), new ApiVersionControllerSelector(config, apiVersionResolver, noApiVersionResolver));
 }