public static FromThumbprint ( string thumbprint ) : |
||
thumbprint | string | |
return |
/// <summary> /// Helper method to convert to an in memory subscription object. /// </summary> /// <returns>The in memory subscription</returns> public WindowsAzureSubscription ToAzureSubscription() { var result = new WindowsAzureSubscription { SubscriptionName = this.Name, SubscriptionId = this.SubscriptionId, ServiceEndpoint = !string.IsNullOrEmpty(ManagementEndpoint) ? new Uri(ManagementEndpoint) : null, ResourceManagerEndpoint = !string.IsNullOrEmpty(ResourceManagerEndpoint) ? new Uri(ResourceManagerEndpoint) : null, ActiveDirectoryEndpoint = ActiveDirectoryEndpoint, ActiveDirectoryTenantId = ActiveDirectoryTenantId, ActiveDirectoryUserId = ActiveDirectoryUserId, ActiveDirectoryServiceEndpointResourceId = ActiveDirectoryServiceEndpointResourceId, IsDefault = this.IsDefault, Certificate = !string.IsNullOrEmpty(ManagementCertificate) ? WindowsAzureCertificate.FromThumbprint(ManagementCertificate) : null, CurrentStorageAccountName = CloudStorageAccount, GalleryEndpoint = !string.IsNullOrEmpty(GalleryEndpoint) ? new Uri(GalleryEndpoint) : null, SqlDatabaseDnsSuffix = SqlDatabaseDnsSuffix ?? WindowsAzureEnvironmentConstants.AzureSqlDatabaseDnsSuffix, }; RegisteredResourceProviders = RegisteredResourceProviders ?? new string[0]; foreach (var resource in RegisteredResourceProviders) { result.RegisteredResourceProviders.Add(resource); } return(result); }
/// <summary> /// Helper method to convert to an in memory subscription object. /// </summary> /// <returns>The in memory subscription</returns> public WindowsAzureSubscription ToAzureSubscription() { var result = new WindowsAzureSubscription { SubscriptionName = this.Name, SubscriptionId = this.SubscriptionId, ServiceEndpoint = new Uri(ManagementEndpoint), ActiveDirectoryEndpoint = ActiveDirectoryEndpoint, ActiveDirectoryTenantId = ActiveDirectoryTenantId, ActiveDirectoryUserId = ActiveDirectoryUserId, IsDefault = this.IsDefault, Certificate = !string.IsNullOrEmpty(ManagementCertificate) ? WindowsAzureCertificate.FromThumbprint(ManagementCertificate) : null, CurrentStorageAccountName = CloudStorageAccount }; RegisteredResourceProviders = RegisteredResourceProviders ?? new string[0]; foreach (var resource in RegisteredResourceProviders) { result.RegisteredResourceProviders.Add(resource); } return(result); }