Table of Contents

Interface IPackageReferencesClient

Namespace
Nexus.Api.V1
Assembly
Nexus.Api.dll

Provides methods to interact with package references.

public interface IPackageReferencesClient

Methods

Create(PackageReference)

Creates a package reference.

Guid Create(PackageReference packageReference)

Parameters

packageReference PackageReference

The package reference to create.

Returns

Guid

CreateAsync(PackageReference, CancellationToken)

Creates a package reference.

Task<Guid> CreateAsync(PackageReference packageReference, CancellationToken cancellationToken = default)

Parameters

packageReference PackageReference

The package reference to create.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<Guid>

Delete(Guid)

Deletes a package reference.

void Delete(Guid id)

Parameters

id Guid

The ID of the package reference.

DeleteAsync(Guid, CancellationToken)

Deletes a package reference.

Task DeleteAsync(Guid id, CancellationToken cancellationToken = default)

Parameters

id Guid

The ID of the package reference.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task

Get()

Gets the list of package references.

IReadOnlyDictionary<string, PackageReference> Get()

Returns

IReadOnlyDictionary<string, PackageReference>

GetAsync(CancellationToken)

Gets the list of package references.

Task<IReadOnlyDictionary<string, PackageReference>> GetAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<IReadOnlyDictionary<string, PackageReference>>

GetVersions(PackageReference)

Gets package versions.

IReadOnlyList<string> GetVersions(PackageReference packageReference)

Parameters

packageReference PackageReference

The package reference to get versions for.

Returns

IReadOnlyList<string>

GetVersionsAsync(PackageReference, CancellationToken)

Gets package versions.

Task<IReadOnlyList<string>> GetVersionsAsync(PackageReference packageReference, CancellationToken cancellationToken = default)

Parameters

packageReference PackageReference

The package reference to get versions for.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<IReadOnlyList<string>>

Update(PackageReference, Guid?)

Updates a package reference.

HttpResponseMessage Update(PackageReference packageReference, Guid? id = null)

Parameters

packageReference PackageReference

The new package reference.

id Guid?

The identifier of the package reference to update.

Returns

HttpResponseMessage

UpdateAsync(PackageReference, Guid?, CancellationToken)

Updates a package reference.

Task<HttpResponseMessage> UpdateAsync(PackageReference packageReference, Guid? id = null, CancellationToken cancellationToken = default)

Parameters

packageReference PackageReference

The new package reference.

id Guid?

The identifier of the package reference to update.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<HttpResponseMessage>