static void FillLib(Library lib) { var readers = new[] { lib.RegReader("r1"), lib.RegReader("r2"), lib.RegReader("r3"), }; var items = new LibItem[] { lib.AddBook("bb01", "50 Shades Of Grey", "E. L. James"), lib.AddBook("bb02", "Harry Potter And Some Thing", "J. K. Rolling"), lib.AddMagazine("m001", "Cosmopolitan", "Jan, 2015"), lib.AddMagazine("m002", "Занимательная механика", "Янв, 2015"), }; lib.TakeItem(readers[0], items[0]); lib.TakeItem(readers[0], items[2]); lib.TakeItem(readers[1], items[0]); lib.TakeItem(readers[1], items[1]); lib.TakeItem(readers[1], items[2]); lib.TakeItem(readers[1], items[3]); }
public void ReturnItem(Reader reader, LibItem item) { GetReadingItems(reader).Remove(item); }
public void TakeItem(Reader reader, LibItem item) { GetReadingItems(reader).Add(item); }