Example #1
0
 /// <summary>
 /// The Get Client Root Certificate operation returns the public
 /// portion of a previously uploaded client root certificate in a
 /// base-64 encoded format from Windows Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn205127.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='certificateThumbprint'>
 /// The X509 certificate thumbprint.
 /// </param>
 /// <returns>
 /// A standard storage response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static ClientRootCertificateGetResponse Get(this IClientRootCertificateOperations operations, string virtualNetworkName, string certificateThumbprint)
 {
     try
     {
         return(operations.GetAsync(virtualNetworkName, certificateThumbprint).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Example #2
0
 /// <summary>
 /// The Get Client Root Certificate operation returns the public
 /// portion of a previously uploaded client root certificate in a
 /// base-64-encoded format from Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn205127.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='certificateThumbprint'>
 /// Required. The X509 certificate thumbprint.
 /// </param>
 /// <returns>
 /// Response to the Get Client Root Certificate operation.
 /// </returns>
 public static Task <ClientRootCertificateGetResponse> GetAsync(this IClientRootCertificateOperations operations, string networkName, string certificateThumbprint)
 {
     return(operations.GetAsync(networkName, certificateThumbprint, CancellationToken.None));
 }