Exemplo n.º 1
0
 /// <summary>
 /// Modifies the Alarm with the Id provided to the values supplied.  Returns
 /// the modified Alarm.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// Id of the Alarm to be modified.  Must be double URL encoded.
 /// </param>
 /// <param name='updatedItem'>
 /// Item to be updated.  All modfied properties will be changed.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <AlarmModel> UpdateAsync(this IAlarms operations, string id, UpdateAlarmModel updatedItem, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(id, updatedItem, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Modifies the Alarm with the Id provided to the values supplied.  Returns
 /// the modified Alarm.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// Id of the Alarm to be modified.  Must be double URL encoded.
 /// </param>
 /// <param name='updatedItem'>
 /// Item to be updated.  All modfied properties will be changed.
 /// </param>
 public static AlarmModel Update(this IAlarms operations, string id, UpdateAlarmModel updatedItem)
 {
     return(Task.Factory.StartNew(s => ((IAlarms)s).UpdateAsync(id, updatedItem), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }