Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultApiVersionDescriptionProvider"/> class.
        /// </summary>
        /// <param name="actionDescriptorCollectionProvider">The <see cref="IActionDescriptorCollectionProvider">provider</see> used to enumerate the actions within an application.</param>
        /// <param name="apiExplorerOptions">The <see cref="IOptions{TOptions}">container</see> of configured <see cref="ApiExplorerOptions">API explorer options</see>.</param>
        public DefaultApiVersionDescriptionProvider(IActionDescriptorCollectionProvider actionDescriptorCollectionProvider, IOptions <ApiExplorerOptions> apiExplorerOptions)
        {
            Arg.NotNull(actionDescriptorCollectionProvider, nameof(actionDescriptorCollectionProvider));
            Arg.NotNull(apiExplorerOptions, nameof(apiExplorerOptions));

            apiVersionDescriptions = LazyApiVersionDescriptions.Create(this, actionDescriptorCollectionProvider);
            options = apiExplorerOptions;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultApiVersionDescriptionProvider"/> class.
 /// </summary>
 /// <param name="actionDescriptorCollectionProvider">The <see cref="IActionDescriptorCollectionProvider">provider</see> used to enumerate the actions within an application.</param>
 /// <param name="apiExplorerOptions">The <see cref="IOptions{TOptions}">container</see> of configured <see cref="ApiExplorerOptions">API explorer options</see>.</param>
 public DefaultApiVersionDescriptionProvider(IActionDescriptorCollectionProvider actionDescriptorCollectionProvider, IOptions <ApiExplorerOptions> apiExplorerOptions)
 {
     apiVersionDescriptions = LazyApiVersionDescriptions.Create(this, actionDescriptorCollectionProvider);
     options = apiExplorerOptions;
 }