/// <summary> /// Initializes a new instance of the <see cref="ODataSwaggerProvider" /> class. /// Use this constructor to customize all <see cref="ODataSwaggerProvider" /> dependencies. /// </summary> /// <param name="defaultProvider">The default provider.</param> /// <param name="options">The options.</param> /// <param name="apiVersions">The version information.</param> /// <param name="odataApiExplorer">The API explorer.</param> /// <param name="httpConfig">The HttpConfiguration that contains the OData Edm Model.</param> internal ODataSwaggerProvider(ISwaggerProvider defaultProvider, SwaggerProviderOptions options, IDictionary<string, Info> apiVersions, IApiExplorer odataApiExplorer, HttpConfiguration httpConfig) { Contract.Requires(defaultProvider != null); Contract.Requires(odataApiExplorer != null); Contract.Requires(httpConfig != null); Contract.Requires(options != null); _defaultProvider = defaultProvider; _httpConfig = httpConfig; _options = new ODataSwaggerProviderOptions(options); _apiVersions = apiVersions; _odataApiExplorer = odataApiExplorer; }
/// <summary> /// Initializes a new instance of the <see cref="ODataSwaggerProvider" /> class. /// Use this constructor to customize all <see cref="ODataSwaggerProvider" /> dependencies. /// </summary> /// <param name="defaultProvider">The default provider.</param> /// <param name="options">The options.</param> /// <param name="apiVersions">The version information.</param> /// <param name="odataApiExplorer">The API explorer.</param> /// <param name="httpConfig">The HttpConfiguration that contains the OData Edm Model.</param> internal ODataSwaggerProvider(ISwaggerProvider defaultProvider, SwaggerProviderOptions options, IDictionary <string, Info> apiVersions, IApiExplorer odataApiExplorer, HttpConfiguration httpConfig) { Contract.Requires(defaultProvider != null); Contract.Requires(odataApiExplorer != null); Contract.Requires(httpConfig != null); Contract.Requires(options != null); _defaultProvider = defaultProvider; _httpConfig = httpConfig; _options = new ODataSwaggerProviderOptions(options); _apiVersions = apiVersions; _odataApiExplorer = odataApiExplorer; }