示例#1
0
 /// <summary>
 /// Create new AlarmGroup
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='newAlarmGroup'>
 /// The entity to create
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async System.Threading.Tasks.Task <object> PostBynewAlarmGroupAsync(this IAlarmGroups operations, CreateAlarmGroupDto newAlarmGroup, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.PostBynewAlarmGroupWithHttpMessagesAsync(newAlarmGroup, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#2
0
 /// <summary>
 /// Create new AlarmGroup
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='newAlarmGroup'>
 /// The entity to create
 /// </param>
 public static object PostBynewAlarmGroup(this IAlarmGroups operations, CreateAlarmGroupDto newAlarmGroup)
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IAlarmGroups)s).PostBynewAlarmGroupAsync(newAlarmGroup), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }