Beispiel #1
0
 /// <summary>
 /// Deletes the AlarmEventType with the Id provided.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// Id of the AlarmEventType to be deleted.  Must be double URL encoded.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> DeleteAsync(this IAlarmEventTypes operations, string id, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DeleteWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Creates a new AlarmEventType and returns it.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='newItem'>
 /// Definition of how the AlarmEventType will be created.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <AlarmEventTypeModel> CreateAsync(this IAlarmEventTypes operations, NewAlarmEventTypeModel newItem, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(newItem, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #3
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);
     }
 }
Beispiel #4
0
 /// <summary>
 /// Returns all AlarmEventTypes which fit the filter criteria supplied.  All
 /// filter parameters are optional.  AlarmEventTypes will be ordered and
 /// paged as requested.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Return only AlarmEventType whose name contains this value.
 /// </param>
 /// <param name='orderBy'>
 /// AlarmEventType will be returned in this order.  NameAscending by default.
 /// Possible values include: 'NameAscending', 'NameDescending'
 /// </param>
 /// <param name='take'>
 /// Number of AlarmEventType that should be returned.  200 by default.
 /// </param>
 /// <param name='skip'>
 /// Number of AlarmEvent that should be skipped before items are returned.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <AlarmEventTypeModel> > RetrieveAsync(this IAlarmEventTypes operations, string name = default(string), string orderBy = default(string), int?take = default(int?), int?skip = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RetrieveWithHttpMessagesAsync(name, orderBy, take, skip, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #5
0
 /// <summary>
 /// Returns all AlarmEventTypes which fit the filter criteria supplied.  All
 /// filter parameters are optional.  AlarmEventTypes will be ordered and
 /// paged as requested.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Return only AlarmEventType whose name contains this value.
 /// </param>
 /// <param name='orderBy'>
 /// AlarmEventType will be returned in this order.  NameAscending by default.
 /// Possible values include: 'NameAscending', 'NameDescending'
 /// </param>
 /// <param name='take'>
 /// Number of AlarmEventType that should be returned.  200 by default.
 /// </param>
 /// <param name='skip'>
 /// Number of AlarmEvent that should be skipped before items are returned.
 /// </param>
 public static IList <AlarmEventTypeModel> Retrieve(this IAlarmEventTypes operations, string name = default(string), string orderBy = default(string), int?take = default(int?), int?skip = default(int?))
 {
     return(Task.Factory.StartNew(s => ((IAlarmEventTypes)s).RetrieveAsync(name, orderBy, take, skip), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Beispiel #6
0
 /// <summary>
 /// Deletes the AlarmEventType with the Id provided.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// Id of the AlarmEventType to be deleted.  Must be double URL encoded.
 /// </param>
 public static object Delete(this IAlarmEventTypes operations, string id)
 {
     return(Task.Factory.StartNew(s => ((IAlarmEventTypes)s).DeleteAsync(id), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Beispiel #7
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());
 }
Beispiel #8
0
 /// <summary>
 /// Creates a new AlarmEventType and returns it.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='newItem'>
 /// Definition of how the AlarmEventType will be created.
 /// </param>
 public static AlarmEventTypeModel Create(this IAlarmEventTypes operations, NewAlarmEventTypeModel newItem)
 {
     return(Task.Factory.StartNew(s => ((IAlarmEventTypes)s).CreateAsync(newItem), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }