public async Task UpdateAsync(NuGetFeedEntity entity) { await Client.PutAsync(entity, "Self", entity).ConfigureAwait(false); }
public async Task RemoveAsync(NuGetFeedEntity entity) { await Client.DeleteAsync(entity, "Self", entity).ConfigureAwait(false); }
/// <summary> /// Update an existing feed. /// </summary> /// <param name="entity">The feed to update.</param> /// <param name="cancellationToken">A <see cref="CancellationToken"/> allowing the operation to be canceled.</param> /// <returns>A task indicating completion.</returns> public async Task UpdateAsync(NuGetFeedEntity entity, CancellationToken cancellationToken = default) { await Client.PutAsync(entity, "Self", entity, cancellationToken : cancellationToken).ConfigureAwait(false); }
public async Task <NuGetFeedEntity> AddAsync(NuGetFeedEntity entity) { return(await Client.PostAsync <NuGetFeedEntity, NuGetFeedEntity>(entity, "Create", entity).ConfigureAwait(false)); }
/// <summary> /// Add a new feed. /// </summary> /// <param name="entity">The feed to add.</param> /// <param name="cancellationToken">A <see cref="CancellationToken"/> allowing the operation to be canceled.</param> /// <returns>The feed, with server-allocated properties such as <see cref="Entity.Id"/> initialized.</returns> public async Task <NuGetFeedEntity> AddAsync(NuGetFeedEntity entity, CancellationToken cancellationToken = default) { return(await GroupCreateAsync <NuGetFeedEntity, NuGetFeedEntity>(entity, cancellationToken : cancellationToken).ConfigureAwait(false)); }