示例#1
0
		private void HandleSelectionChanged (object sender, EventArgs e)
		{
			var configFilename = btnFileChooser.Filename;

			var jsonService = new JsonService (new IoService ());
			jsonService.Init (configFilename);

			syncConfig = jsonService.SyncConfig;

			InvokeSyncConfigChanged (syncConfig);
		}
示例#2
0
文件: Main.cs 项目: draptik/RepoSync
		public static void Main (string[] args)
		{
			if (args != null && args.Length != 1) {
				throw new ArgumentOutOfRangeException("Provide config file name!");
			}

			string configFilename = args[0];

			// get configuration...
			var service = new JsonService(new IoService());
			service.Init(configFilename);

			var config = service.SyncConfig;

			// git pull...
			var gitService = new GitService();
			foreach (var entry in config.Entries) {
				var response = gitService.Pull(entry);
				Console.WriteLine ("response was: " + response.Msg);
			}

		}