Table of Contents

Class NuGetProtocolHelper

Namespace
SunamoNuGetProtocol
Assembly
SunamoNuGetProtocol.dll

Provides helper methods for interacting with the NuGet V3 protocol API.

public class NuGetProtocolHelper
Inheritance
NuGetProtocolHelper
Inherited Members
Extension Methods

Methods

GetPackageVersions(string)

Retrieves all available versions of a specified NuGet package.

public static Task<IEnumerable<NuGetVersion>> GetPackageVersions(string packageId)

Parameters

packageId string

The unique identifier of the NuGet package.

Returns

Task<IEnumerable<NuGetVersion>>

An enumerable of all available NuGet versions for the specified package.

SearchNugetPackages(string)

Searches for NuGet packages matching the specified query. Note: NuGet API may cache results. Run "dotnet nuget locals --clear all" to clear the cache before searching.

public static Task<List<IPackageSearchMetadata>> SearchNugetPackages(string query)

Parameters

query string

The search query string to find NuGet packages.

Returns

Task<List<IPackageSearchMetadata>>

A list of package search metadata matching the query.