/// <summary>
 /// Initiates an Import of a DACPAC file from Azure Blob Storage into a
 /// Azure SQL Database.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IDacOperations.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Database Server into which the
 /// database is being imported.
 /// </param>
 /// <param name='parameters'>
 /// Optional. The parameters needed to initiated the Import request.
 /// </param>
 /// <returns>
 /// Represents the response that the service returns once an import or
 /// export operation has been initiated.
 /// </returns>
 public static DacImportExportResponse Import(this IDacOperations operations, string serverName, DacImportParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IDacOperations)s).ImportAsync(serverName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// Initiates an Import of a DACPAC file from Azure Blob Storage into a
 /// Azure SQL Database.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IDacOperations.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Database Server into which the
 /// database is being imported.
 /// </param>
 /// <param name='parameters'>
 /// Optional. The parameters needed to initiated the Import request.
 /// </param>
 /// <returns>
 /// Represents the response that the service returns once an import or
 /// export operation has been initiated.
 /// </returns>
 public static Task<DacImportExportResponse> ImportAsync(this IDacOperations operations, string serverName, DacImportParameters parameters)
 {
     return operations.ImportAsync(serverName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// Import DAC from Windows Azure blob storage.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IDacOperations.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server being imported to.
 /// </param>
 /// <param name='parameters'>
 /// Import parameters.
 /// </param>
 /// <returns>
 /// Response for an DAC Import/Export request.
 /// </returns>
 public static DacImportExportResponse Import(this IDacOperations operations, string serverName, DacImportParameters parameters)
 {
     try
     {
         return operations.ImportAsync(serverName, parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }