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

Init() private method

Load folder configuration.
private Init ( string folderName ) : void
folderName string
return void
		private void Init (string folderName)
		{
			Config config = ConfigManager.CurrentConfig;
            CmisSync.Lib.Config.SyncConfig.Folder folder = config.getFolder(folderName);
            if (folder == null)
            {
                System.Console.WriteLine("No folder found with this name: " + folderName);
                return;
            }
			RepoInfo repoInfo = folder.GetRepoInfo();
			
			ConsoleController controller = new ConsoleController ();
			cmisRepo = new CmisRepo (repoInfo, controller);
			
			cmisRepo.Initialize ();
		}

Usage Example

Example #1
0
        /// <summary>
        /// Main method, pass folder name as argument.
        /// </summary>
		public static void Main (string[] args)
		{
            // Check arguments.
            if (args.Length < 1)
            {
                System.Console.WriteLine("Usage: CmisSyncOnce.exe mysyncedfolder");
                System.Console.WriteLine("Example: CmisSyncOnce.exe \"192.168.0.22\\Main Repository\"");
                System.Console.WriteLine("See your folders names in C:\\Users\\you\\AppData\\Roaming\\cmissync\\config.xml or similar");
                return;
            }

            // Load and synchronize.
			CmisSyncOnce once = new CmisSyncOnce();
			once.Init(args[0]);
            once.Sync();
		}
All Usage Examples Of CmisSync.Console.CmisSyncOnce::Init