/// <summary> /// Creates new instance from CloudServiceClient. /// </summary> /// <param name="subscription">The subscription data</param> /// <param name="currentLocation">Directory to do operations in</param> /// <param name="debugStream">Action used to log http requests/responses</param> /// <param name="verboseStream">Action used to log detailed client progress</param> /// <param name="warningStream">Action used to log warning messages</param> public CloudServiceClient( AzureSubscription subscription, string currentLocation = null, Action<string> debugStream = null, Action<string> verboseStream = null, Action<string> warningStream = null) : this(currentLocation, debugStream, warningStream, verboseStream) { Subscription = subscription; CloudBlobUtility = new CloudBlobUtility(); ManagementClient = AzureSession.ClientFactory.CreateClient<ManagementClient>(subscription, AzureEnvironment.Endpoint.ServiceManagement); StorageClient = AzureSession.ClientFactory.CreateClient<StorageManagementClient>(subscription, AzureEnvironment.Endpoint.ServiceManagement); ComputeClient = AzureSession.ClientFactory.CreateClient<ComputeManagementClient>(subscription, AzureEnvironment.Endpoint.ServiceManagement); }
internal CloudServiceClient( AzureSubscription subscription, ManagementClient managementClient, StorageManagementClient storageManagementClient, ComputeManagementClient computeManagementClient) : this((string)null, null, null, null) { Subscription = subscription; CurrentDirectory = null; DebugStream = null; VerboseStream = null; WarningStream = null; CloudBlobUtility = new CloudBlobUtility(); ManagementClient = managementClient; StorageClient = storageManagementClient; ComputeClient = computeManagementClient; }