예제 #1
0
 /// <summary>
 /// Creates a new Machine
 /// </summary>
 /// <remarks>
 /// Creates a Machine
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Operation> CreateAsync(this IMachinesOperations operations, NewMachineRequest body = default(NewMachineRequest), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #2
0
 /// <summary>
 /// Creates a new Machine
 /// </summary>
 /// <remarks>
 /// Creates a Machine
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 public static Operation Create(this IMachinesOperations operations, NewMachineRequest body = default(NewMachineRequest))
 {
     return(operations.CreateAsync(body).GetAwaiter().GetResult());
 }