Interface IPackageReferencesClient
Provides methods to interact with package references.
public interface IPackageReferencesClient
Methods
Create(PackageReference)
Creates a package reference.
Guid Create(PackageReference packageReference)
Parameters
packageReferencePackageReferenceThe package reference to create.
Returns
CreateAsync(PackageReference, CancellationToken)
Creates a package reference.
Task<Guid> CreateAsync(PackageReference packageReference, CancellationToken cancellationToken = default)
Parameters
packageReferencePackageReferenceThe package reference to create.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
Delete(Guid)
Deletes a package reference.
void Delete(Guid id)
Parameters
idGuidThe ID of the package reference.
DeleteAsync(Guid, CancellationToken)
Deletes a package reference.
Task DeleteAsync(Guid id, CancellationToken cancellationToken = default)
Parameters
idGuidThe ID of the package reference.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
Get()
Gets the list of package references.
IReadOnlyDictionary<string, PackageReference> Get()
Returns
GetAsync(CancellationToken)
Gets the list of package references.
Task<IReadOnlyDictionary<string, PackageReference>> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetVersions(PackageReference)
Gets package versions.
IReadOnlyList<string> GetVersions(PackageReference packageReference)
Parameters
packageReferencePackageReferenceThe package reference to get versions for.
Returns
GetVersionsAsync(PackageReference, CancellationToken)
Gets package versions.
Task<IReadOnlyList<string>> GetVersionsAsync(PackageReference packageReference, CancellationToken cancellationToken = default)
Parameters
packageReferencePackageReferenceThe package reference to get versions for.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
Update(PackageReference, Guid?)
Updates a package reference.
HttpResponseMessage Update(PackageReference packageReference, Guid? id = null)
Parameters
packageReferencePackageReferenceThe new package reference.
idGuid?The identifier of the package reference to update.
Returns
UpdateAsync(PackageReference, Guid?, CancellationToken)
Updates a package reference.
Task<HttpResponseMessage> UpdateAsync(PackageReference packageReference, Guid? id = null, CancellationToken cancellationToken = default)
Parameters
packageReferencePackageReferenceThe new package reference.
idGuid?The identifier of the package reference to update.
cancellationTokenCancellationTokenThe token to cancel the current operation.