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)); }
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); }
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); }
public void SetUp() { _listToShift = new List <ShiftableEntity>(); _shifter = new ListShifter <ShiftableEntity, int>(); }
public void SetUp() { _listToShift = new List<IShiftableEntity<int>>(); _shifter = new ListShifter<int>(); }