Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            LoadParams(args);

            CleanFolderParams();

            if (!ParamsAreValid())
            {
                DisplayUsageMessage();
            }
            else
            {
                if (DisplayLoadedParams)
                {
                    Console.WriteLine("SourceFolder = " + SourceFolder);
                    Console.WriteLine("DestFolder = " + DestFolder);
                    Console.WriteLine("ForceDestDelete = " + ForceDestDelete.ToString());
                    Console.WriteLine("DisplayLoadedParams = " + DisplayLoadedParams.ToString());
                }
                Synchronizer.SyncFolders(SourceFolder, DestFolder, ForceDestDelete);
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Logger.AddInstance(new ConsoleLogger());
            Logger.AddInstance(new FileLogger());

            var config = new SyncConfiguration();

            PrintHeader();

            if (config.NoParameters)
            {
                Console.WriteLine("Параметры:");
                config.PrintHelp();
                Console.ReadKey();
                return;
            }

            var synchronizer = new Synchronizer();

            synchronizer.Run(config);

            Console.Write("Нажмите любую клавишу ...");
            Console.ReadKey();
        }