Exemplo n.º 1
0
        public TimeSpan Start()
        {
            var s = new Stopwatch();

            s.Start();
            foreach (var t in _tablesToCopy)
            {
                var rows = _databaseIO.GetRows(t);
                StartingWith?.Invoke(this, new Tuple <string, long>(t.FullTableName, rows));
                _databaseIO.TimeOut = Timeout;
                _databaseIO.CopyTable(t);
                //System.Threading.Thread.Sleep(5000); // simulate long operation
                DoneWith?.Invoke(this, t.FullTableName);
            }
            DoneWith?.Invoke(this, null);
            s.Stop();
            return(s.Elapsed);
        }