Exemplo n.º 1
0
 /// <summary>
 /// The Add Management Certificate operation adds a certificate to the
 /// list of management certificates. Management certificates, which
 /// are also known as subscription certificates, authenticate clients
 /// attempting to connect to resources associated with your Windows
 /// Azure subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154123.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IManagementCertificateOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Management Certificate operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse Create(this IManagementCertificateOperations operations, ManagementCertificateCreateParameters parameters)
 {
     try
     {
         return(operations.CreateAsync(parameters).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// The Add Management Certificate operation adds a certificate to the
 /// list of management certificates. Management certificates, which
 /// are also known as subscription certificates, authenticate clients
 /// attempting to connect to resources associated with your Windows
 /// Azure subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154123.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IManagementCertificateOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Management Certificate operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <OperationResponse> CreateAsync(this IManagementCertificateOperations operations, ManagementCertificateCreateParameters parameters)
 {
     return(operations.CreateAsync(parameters, CancellationToken.None));
 }