/// <summary>
 /// Adds a new SQL Database server to a subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715274.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IServerOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Server operation.
 /// </param>
 /// <returns>
 /// The response returned from the Create Server operation.
 /// </returns>
 public static ServerCreateResponse Create(this IServerOperations operations, ServerCreateParameters parameters)
 {
     try
     {
         return operations.CreateAsync(parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// Adds a new SQL Database server to a subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715274.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IServerOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Server operation.
 /// </param>
 /// <returns>
 /// The response returned from the Create Server operation.
 /// </returns>
 public static Task<ServerCreateResponse> CreateAsync(this IServerOperations operations, ServerCreateParameters parameters)
 {
     return operations.CreateAsync(parameters, CancellationToken.None);
 }
 /// <summary>
 /// Adds a new SQL Database server to a subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715274.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IServerOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Create Server operation.
 /// </param>
 /// <returns>
 /// The response returned from the Create Server operation.
 /// </returns>
 public static ServerCreateResponse Create(this IServerOperations operations, ServerCreateParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IServerOperations)s).CreateAsync(parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }