Ejemplo n.º 1
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='value'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task PutAsync(this IDiscountOperations operations, string locationId, string id, Discount value, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.PutWithHttpMessagesAsync(locationId, id, value, null, cancellationToken).ConfigureAwait(false);
 }
Ejemplo n.º 2
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='value'>
 /// </param>
 public static void Put(this IDiscountOperations operations, string locationId, string id, Discount value)
 {
     Task.Factory.StartNew(s => ((IDiscountOperations)s).PutAsync(locationId, id, value), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }