Esempio n. 1
0
		private static TestHarnessSettings LoadSettings()
		{
			var settings = new TestHarnessSettings();
			if (File.Exists("Settings.json"))
			{
				settings = JsonConvert.DeserializeObject<TestHarnessSettings>(File.ReadAllText("Settings.json"));
			}

			Console.Write("Server URI: ");
			Console.Write(settings.ServerUri);
			settings.ServerUri = Console.ReadLine().OrDefault(settings.ServerUri);

			Console.Write("Account username: "******"Account password: "******"Company name: ");
			Console.Write(settings.CompanyName);
			settings.CompanyName = Console.ReadLine().OrDefault(settings.CompanyName);
			Console.Write("Username: "******"Password: "******"Settings.json", JsonConvert.SerializeObject(settings));

			return settings;
		}
Esempio n. 2
0
        private static TestHarnessSettings LoadSettings()
        {
            var settings = new TestHarnessSettings();

            if (File.Exists("Settings.json"))
            {
                settings = JsonConvert.DeserializeObject <TestHarnessSettings>(File.ReadAllText("Settings.json"));
            }

            Console.Write("Server URI: ");
            Console.Write(settings.ServerUri);
            settings.ServerUri = Console.ReadLine().OrDefault(settings.ServerUri);

            Console.Write("Account username: "******"Account password: "******"Company name: ");
            Console.Write(settings.CompanyName);
            settings.CompanyName = Console.ReadLine().OrDefault(settings.CompanyName);
            Console.Write("Username: "******"Password: "******"Settings.json", JsonConvert.SerializeObject(settings));

            return(settings);
        }