CmisSync.Console.CmisSyncOnce.Sync C# (CSharp) Method

Sync() private method

Synchronize folder.
private Sync ( ) : void
return void
		private void Sync ()
		{
            cmisRepo.SyncInBackground(); // TODO should not be put in background.
		}
	}

Usage Example

示例#1
0
        /// <summary>
        /// Main method, pass folder name as argument.
        /// </summary>
		public static void Main (string[] args)
		{
            Utils.ConfigureLogging();

            CmisSyncOnce once = new CmisSyncOnce();

            // Load the specified synchronized folders, or all if none is specified.
            if (args.Length > 0)
            {
                for (int i = 0; i < args.Length; i++)
                {
                    once.AddSynchronizedFolder(args[i]);
                }
            }
            else
            {
                Config config = ConfigManager.CurrentConfig;
                foreach (CmisSync.Lib.Config.SyncConfig.Folder folder in config.Folders)
                {
                    RepoInfo repoInfo = folder.GetRepoInfo();
                    once.repos.Add(repoInfo);
                }
            }

            // Synchronize all
            once.Sync();
		}
All Usage Examples Of CmisSync.Console.CmisSyncOnce::Sync