getRequiredResourceUri method

Uri getRequiredResourceUri(
  1. List<String> types
)

Retrieves the required resource Uri for the specified resource types.

For more information on required resources, see https://learn.microsoft.com/nuget/api/overview#resources-and-schema

Implementation

Uri getRequiredResourceUri(List<String> types) {
  final resourceUri = getResourceUri(types);
  if (resourceUri == null) {
    throw NuGetServerException(
        'The service index does not have a resource named `${types.last}`.');
  }

  return resourceUri;
}