public MainForm() { InitializeComponent(); _artSupplyRepo = new ArtSupplyFileRepository("data\\artSupplies.json"); _coloringBookPageRepo = new ColoringBookPageFileRepository("data\\coloringBookPages.json", _artSupplyRepo); _coloringBookRepo = new ColoringBookFileRepository("data\\coloringBooks.json", _coloringBookPageRepo); }
public ColoringBookFileRepository(string fileName, IColoringBookPageRepository coloringBookPageRepo) { if (fileName == null) { throw new ArgumentNullException(nameof(fileName)); } if (coloringBookPageRepo == null) { throw new ArgumentNullException(nameof(coloringBookPageRepo)); } _fileName = fileName; _coloringBookPageRepo = coloringBookPageRepo; }