/// <summary>
 /// Initializes a new instance of the <see cref="ApiVersionControllerSelector"/> class.
 /// </summary>
 /// <param name="configuration">The <see cref="HttpConfiguration">configuration</see> to initialize
 /// the controller selector with.</param>
 /// <param name="options">The <see cref="ApiVersioningOptions">service versioning options</see>
 /// associated with the controller selector.</param>
 public ApiVersionControllerSelector(HttpConfiguration configuration, ApiVersioningOptions options)
 {
     this.configuration  = configuration;
     this.options        = options;
     controllerInfoCache = new Lazy <ConcurrentDictionary <string, HttpControllerDescriptorGroup> >(InitializeControllerInfoCache);
     controllerTypeCache = new HttpControllerTypeCache(this.configuration);
 }
Пример #2
0
 internal ConventionRouteControllerSelector(HttpControllerTypeCache controllerTypeCache) => this.controllerTypeCache = controllerTypeCache;
 internal ConventionRouteControllerSelector(ApiVersioningOptions options, HttpControllerTypeCache controllerTypeCache)
     : base(options)
 {
     Contract.Requires(controllerTypeCache != null);
     this.controllerTypeCache = controllerTypeCache;
 }
Пример #4
0
 internal ConventionRouteControllerSelector(ApiVersioningOptions options, HttpControllerTypeCache controllerTypeCache)
     : base(options) => this.controllerTypeCache = controllerTypeCache;