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); }
public static void Configure(HttpConfiguration config, IApiVersionResolver apiVersionResolver, INoApiVersionResolver noApiVersionResolver) { config.Services.Replace(typeof(IHttpControllerSelector), new ApiVersionControllerSelector(config, apiVersionResolver, noApiVersionResolver)); }