示例#1
0
        static SubscriptionCloudCredentials Credentials(this AzureAccount account, ICertificateStore certificateStore)
        {
            var certificate = certificateStore.GetOrAdd(account.CertificateThumbprint, account.CertificateBytes);

            return(new CertificateCloudCredentials(account.SubscriptionNumber, certificate));
        }
示例#2
0
 public static ComputeManagementClient CreateComputeManagementClient(this AzureAccount account, ICertificateStore certificateStore)
 {
     return(string.IsNullOrWhiteSpace(account.ServiceManagementEndpointBaseUri)
         ? new ComputeManagementClient(account.Credentials(certificateStore))
         : new ComputeManagementClient(account.Credentials(certificateStore), new Uri(account.ServiceManagementEndpointBaseUri)));
 }