Exemplo n.º 1
0
        /// <summary>
        /// Gets the hash code.
        /// </summary>
        /// <returns>The hash code.</returns>
        public override int GetHashCode()
        {
            if (_writeConcern.IsFrozen)
            {
                return(_frozenHashCode);
            }

            // see Effective Java by Joshua Bloch
            int hash = 17;

            hash = 37 * hash + Enabled.GetHashCode();
            hash = 37 * hash + FSync.GetHashCode();
            hash = 37 * hash + Journal.GetHashCode();
            hash = 37 * hash + W.GetHashCode();
            hash = 37 * hash + ((WMode == null) ? 0 : WMode.GetHashCode());
            hash = 37 * hash + WTimeout.GetHashCode();
            return(hash);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            FSync photoSync = new FSync();

            while (true)
            {
                SourceFolder = ConfigurationManager.AppSettings[nameof(SourceFolder)];

                DestFolder = ConfigurationManager.AppSettings[nameof(DestFolder)];

                Console.WriteLine("Начало сканирования каталога " + SourceFolder);
                Console.WriteLine("Папка-приёмник " + DestFolder);
                Console.WriteLine("Для остановки сканирования нажмите Enter");
                photoSync.StartChecking();
                Console.ReadLine();
                photoSync.StopChecking();
                Console.WriteLine("Для начала сканирования нажмите Enter");
                Console.ReadLine();
            }
        }
Exemplo n.º 3
0
 public FSyncService()
 {
     InitializeComponent();
     CanPauseAndContinue = true;
     _fSync = new FSync();
 }