public static string GetRequiredResourceUrl(this ServiceIndexResponse serviceIndex, string[] types, string resourceName) { // For more information on required resources, // see: https://docs.microsoft.com/en-us/nuget/api/overview#resources-and-schema var resourceUrl = serviceIndex.GetResourceUrl(types); if (string.IsNullOrEmpty(resourceUrl)) { throw new InvalidOperationException( $"The service index does not have a resource named '{resourceName}'"); } return(resourceUrl); }
public static string GetCatalogResourceUrl(this ServiceIndexResponse serviceIndex) { return(serviceIndex.GetResourceUrl(Catalog)); }
public static string GetSearchAutocompleteResourceUrl(this ServiceIndexResponse serviceIndex) { return(serviceIndex.GetResourceUrl(SearchAutocompleteService)); }
public static string GetSymbolPublishResourceUrl(this ServiceIndexResponse serviceIndex) { return(serviceIndex.GetResourceUrl(SymbolPackagePublish)); }