示例#1
0
 public async Task UpdateAsync(PermalinkEntity entity)
 {
     await Client.PutAsync(entity, "Self", entity).ConfigureAwait(false);
 }
示例#2
0
 public async Task RemoveAsync(PermalinkEntity entity)
 {
     await Client.DeleteAsync(entity, "Self", entity).ConfigureAwait(false);
 }
 /// <summary>
 /// Update an existing permalink.
 /// </summary>
 /// <param name="entity">The permalink 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(PermalinkEntity entity, CancellationToken cancellationToken = default)
 {
     await Client.PutAsync(entity, "Self", entity, cancellationToken : cancellationToken).ConfigureAwait(false);
 }
示例#4
0
 public async Task <PermalinkEntity> AddAsync(PermalinkEntity entity)
 {
     return(await Client.PostAsync <PermalinkEntity, PermalinkEntity>(entity, "Create", entity).ConfigureAwait(false));
 }
 /// <summary>
 /// Add a new permalink.
 /// </summary>
 /// <param name="entity">The permalink to add.</param>
 /// <param name="cancellationToken">A <see cref="CancellationToken"/> allowing the operation to be canceled.</param>
 /// <returns>The permalink, with server-allocated properties such as <see cref="Entity.Id"/> initialized.</returns>
 public async Task <PermalinkEntity> AddAsync(PermalinkEntity entity, CancellationToken cancellationToken = default)
 {
     return(await GroupCreateAsync <PermalinkEntity, PermalinkEntity>(entity, cancellationToken : cancellationToken).ConfigureAwait(false));
 }