/// <summary>
 /// Gets a collection of resource groups.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Internal.Resources.IResourceGroupOperations.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If null is passed returns all resource
 /// groups.
 /// </param>
 /// <returns>
 /// List of resource groups.
 /// </returns>
 public static Task<ResourceGroupListResult> ListAsync(this IResourceGroupOperations operations, ResourceGroupListParameters parameters)
 {
     return operations.ListAsync(parameters, CancellationToken.None);
 }
 /// <summary>
 /// Gets a collection of resource groups.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Internal.Resources.IResourceGroupOperations.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Query parameters. If null is passed returns all resource
 /// groups.
 /// </param>
 /// <returns>
 /// List of resource groups.
 /// </returns>
 public static ResourceGroupListResult List(this IResourceGroupOperations operations, ResourceGroupListParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IResourceGroupOperations)s).ListAsync(parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }