Exemplo n.º 1
0
 public LockProcedure(string either, StartingWith type)
 {
     if (type == StartingWith.StandID)
     {
         StandID = either;
         UserID  = "";
     }
     else
     {
         UserID  = either;
         StandID = "";
     }
     IsLocked = false;
     DateTime = DateTime.Now;
 }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
 static IEnumerable <string> ByPrefix(StartingWith query, Connection <string> connection)
 {
     return(connection.List.Where(x => x.StartsWith(query.Prefix)));
 }