private static void PrintUsage()
        {
            string helpText = GetResource("CloudCopy.Help");

            helpText = helpText.Replace("~~CONFIGFILE~~", ConfigFileHandler.GetDefaultConfigFilePath());

            Console.Write(helpText);
        }
        private static C4CHttpClient CreateCloudClient(TargetDescription targetDescription)
        {
            IClientFactory factory = new ClientFactory();

            C4CHttpClient cloudClient;

            if (targetDescription.Hostname != string.Empty && targetDescription.Username != string.Empty)
            {
                cloudClient = factory.CreateC4CHttpClient(targetDescription.Hostname, new ConsoleCredentialHandler(targetDescription.Username));
            }
            else if (targetDescription.Hostname == string.Empty && targetDescription.Username == string.Empty)
            {
                ConfigFileHandler configFileHandler = new ConfigFileHandler();

                cloudClient = factory.CreateC4CHttpClient(configFileHandler.Hostname, configFileHandler);
            }
            else
            {
                throw new Exception("Either target username or target hostname missing.");
            }

            return(cloudClient);
        }