예제 #1
0
        private List <Lib.Models.Book> MoveBookInList(int id
                                                      , int newPosition
                                                      , List <Lib.Models.Book> oldList)
        {
            var shifter = new ListShifter <Lib.Models.Book, int>
            {
                ListToShift = oldList
            };

            return(shifter.Shift(id, newPosition));
        }
예제 #2
0
        public bool ShiftProductStationRight(string insertedFullName, int id, int productResult, int shiftNumber)
        {
            if (!_initialized)
            {
                StationIndexerException?.Invoke(@"Stations Not Initialized.");
                return(false);
            }
            ListShifter.ShiftRight(_stations, shiftNumber);
            _stations[0] = new MachineStation
            {
                Id = 1,
                ReferenceLoaded = insertedFullName,
                Result          = (ProcessResult)productResult
            };

            return(true);
        }
예제 #3
0
        private List<Lib.Models.Book> MoveBookInList(int id
			, int newPosition
			, List<Lib.Models.Book> oldList)
        {
            var shifter = new ListShifter<Lib.Models.Book, int>
            {
                ListToShift = oldList
            };

            return shifter.Shift(id, newPosition);
        }
예제 #4
0
 public void SetUp()
 {
     _listToShift = new List <ShiftableEntity>();
     _shifter     = new ListShifter <ShiftableEntity, int>();
 }
예제 #5
0
 public void SetUp()
 {
     _listToShift = new List<IShiftableEntity<int>>();
     _shifter = new ListShifter<int>();
 }