Ejemplo n.º 1
0
 /// <summary>
 /// The Upload Client Root Certificate operation is used to upload a
 /// new client root certificate to Windows Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn205129.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IClientRootCertificateOperations.
 /// </param>
 /// <param name='virtualNetworkName'>
 /// The name of the virtual network for this gateway.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Upload client certificate Virtual
 /// Network Gateway operation.
 /// </param>
 /// <returns>
 /// A standard storage response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static GatewayOperationResponse Create(this IClientRootCertificateOperations operations, string virtualNetworkName, ClientRootCertificateCreateParameters parameters)
 {
     try
     {
         return(operations.CreateAsync(virtualNetworkName, parameters).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// The Upload Client Root Certificate operation is used to upload a
 /// new client root certificate to Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn205129.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IClientRootCertificateOperations.
 /// </param>
 /// <param name='networkName'>
 /// Required. The name of the virtual network for this gateway.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Upload Client Root Certificate
 /// Virtual Network Gateway operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <GatewayOperationResponse> CreateAsync(this IClientRootCertificateOperations operations, string networkName, ClientRootCertificateCreateParameters parameters)
 {
     return(operations.CreateAsync(networkName, parameters, CancellationToken.None));
 }