private IEnumerable <ApiDescription> GetApiDescriptionsFor(string apiVersion) { var allDescriptions = _apiDescriptionsProvider.ApiDescriptionGroups.Items .SelectMany(group => group.Items); return((_options.VersionSupportResolver == null) ? allDescriptions : allDescriptions.Where(apiDesc => _options.VersionSupportResolver(apiDesc, apiVersion))); }
private IEnumerable <ApiDescription> GetApiDescriptionsFor(string apiVersion, AreaDescription area, IList <AreaDescription> allAreas) { var apiDescriptions = _options.VersionSupportResolver == null ? _apiExplorer.ApiDescriptions : _apiExplorer.ApiDescriptions.Where(apiDesc => _options.VersionSupportResolver(apiDesc, apiVersion)); if (area == null && allAreas.Count <= 0) { return(apiDescriptions); } if (area == null) { return(GetApiDescriptionsExcludingAreas(apiDescriptions, allAreas)); } return(GetAreaApiDescriptionsFor(area, apiDescriptions)); }
private IEnumerable <ApiDescription> GetApiDescriptionsFor(string apiVersion) { return((_options.VersionSupportResolver == null) ? _apiExplorer.ApiDescriptions : _apiExplorer.ApiDescriptions.Where(apiDesc => _options.VersionSupportResolver(apiDesc, apiVersion))); }