Esempio n. 1
0
 /// <summary>
 /// Create or replace an existing Formula. This operation can take a while to
 /// complete.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='name'>
 /// The name of the formula.
 /// </param>
 /// <param name='formula'>
 /// A formula for creating a VM, specifying an image base and other parameters
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Formula> BeginCreateOrUpdateAsync(this IFormulasOperations operations, string resourceGroupName, string labName, string name, Formula formula, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, labName, name, formula, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// List formulas in a given lab.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Formula> > ListAsync(this IFormulasOperations operations, string resourceGroupName, string labName, ODataQuery <Formula> odataQuery = default(ODataQuery <Formula>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, labName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// List formulas in a given lab.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Formula> > ListNextAsync(this IFormulasOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Get formula.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='name'>
 /// The name of the formula.
 /// </param>
 /// <param name='expand'>
 /// Specify the $expand query. Example: 'properties($select=description)'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Formula> GetAsync(this IFormulasOperations operations, string resourceGroupName, string labName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, name, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 5
0
 /// <summary>
 /// Get formula.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='name'>
 /// The name of the formula.
 /// </param>
 /// <param name='expand'>
 /// Specify the $expand query. Example: 'properties($select=description)'
 /// </param>
 public static Formula Get(this IFormulasOperations operations, string resourceGroupName, string labName, string name, string expand = default(string))
 {
     return(operations.GetAsync(resourceGroupName, labName, name, expand).GetAwaiter().GetResult());
 }
Esempio n. 6
0
 /// <summary>
 /// List formulas in a given lab.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <Formula> List(this IFormulasOperations operations, string resourceGroupName, string labName, ODataQuery <Formula> odataQuery = default(ODataQuery <Formula>))
 {
     return(operations.ListAsync(resourceGroupName, labName, odataQuery).GetAwaiter().GetResult());
 }
Esempio n. 7
0
 /// <summary>
 /// List formulas in a given lab.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Formula> ListNext(this IFormulasOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Esempio n. 8
0
 /// <summary>
 /// Create or replace an existing Formula. This operation can take a while to
 /// complete.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='name'>
 /// The name of the formula.
 /// </param>
 /// <param name='formula'>
 /// A formula for creating a VM, specifying an image base and other parameters
 /// </param>
 public static Formula BeginCreateOrUpdate(this IFormulasOperations operations, string resourceGroupName, string labName, string name, Formula formula)
 {
     return(operations.BeginCreateOrUpdateAsync(resourceGroupName, labName, name, formula).GetAwaiter().GetResult());
 }
Esempio n. 9
0
 /// <summary>
 /// Delete formula.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='name'>
 /// The name of the formula.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IFormulasOperations operations, string resourceGroupName, string labName, string name, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, labName, name, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Esempio n. 10
0
 /// <summary>
 /// Delete formula.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='name'>
 /// The name of the formula.
 /// </param>
 public static void Delete(this IFormulasOperations operations, string resourceGroupName, string labName, string name)
 {
     operations.DeleteAsync(resourceGroupName, labName, name).GetAwaiter().GetResult();
 }