Skip to content

NuGetPackageHelper.GetBestMatch(LibraryRange, PackageSource?, CancellationToken) method

Defined in

Type: NuGetPackageHelper Namespace: ReactiveMarbles.NuGet.Helpers Assembly: ReactiveMarbles.NuGet.Helpers.dll

Applies to

netstandard2.0

Overloads

  • 1. public static Task<PackageIdentity> GetBestMatch(LibraryRange identity, PackageSource? nugetSource = null, CancellationToken token = default(CancellationToken))
  • 2. public static Task<PackageIdentity> GetBestMatch(LibraryRange identity, FindPackageByIdResource findPackageResource, CancellationToken token)

1. Overload

public static Task<PackageIdentity> GetBestMatch(LibraryRange identity, PackageSource? nugetSource = null, CancellationToken token = default(CancellationToken))

Summary: Gets the best matching PackageIdentity for the specified LibraryRange.

Parameters

NameTypeDescription
identityLibraryRangeThe library range to find the best patch for.
nugetSource = nullPackageSource?Optional v3 nuget source. Will default to default nuget.org servers.
token = nullCancellationTokenA optional cancellation token.

Returns: Task -- The best matching PackageIdentity to the specified version range.

2. Overload

public static Task<PackageIdentity> GetBestMatch(LibraryRange identity, FindPackageByIdResource findPackageResource, CancellationToken token)

Summary: Gets the best matching PackageIdentity for the specified LibraryRange.

Parameters

NameTypeDescription
identityLibraryRangeThe library range to find the best patch for.
findPackageResourceFindPackageByIdResourceThe source repository where to match.
tokenCancellationTokenA optional cancellation token.

Returns: Task -- The best matching PackageIdentity to the specified version range.