Example #1
0
 public void Move()
 {
     lock (this)
     {
         CurrentMove.Finish = DateTime.Now;
         _repo.AddMove(CurrentMove);
         //Sending information to client in case of craft is lefting airport and add snapshot
         if ((Number == 4 && Current.Direction == 2) || ((Number == 6 || Number == 7) && Current.Direction == 1))
         {
             _repo.AddLinesSnapshot(new LineDB {
                 IsBusy = false, Number = Number, Direction = String.Empty
             }, -1);
             _airportHub.Clients.All.SendAsync("transferdata", new { Number, State = false });
         }
         //var data = $"Line {Number} start move {Current.Number} from themself";
         //logger.Info(data);
         //logger.Info($"Line {Number} start check queue");
         Current = null;
         Busy    = false;
     }
     CheckQueue();
 }