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