Class PackageReferencesClient
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
public class PackageReferencesClient : IPackageReferencesClient
- Inheritance
-
PackageReferencesClient
- Implements
- Inherited Members
Methods
Create(PackageReference)
Creates a package reference.
public Guid Create(PackageReference packageReference)
Parameters
packageReferencePackageReferenceThe package reference to create.
Returns
CreateAsync(PackageReference, CancellationToken)
Creates a package reference.
public 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.
public void Delete(Guid id)
Parameters
idGuidThe ID of the package reference.
DeleteAsync(Guid, CancellationToken)
Deletes a package reference.
public 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.
public IReadOnlyDictionary<string, PackageReference> Get()
Returns
GetAsync(CancellationToken)
Gets the list of package references.
public Task<IReadOnlyDictionary<string, PackageReference>> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetVersions(PackageReference)
Gets package versions.
public IReadOnlyList<string> GetVersions(PackageReference packageReference)
Parameters
packageReferencePackageReferenceThe package reference to get versions for.
Returns
GetVersionsAsync(PackageReference, CancellationToken)
Gets package versions.
public 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.
public 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.
public 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.