private void ReadJSON(string path) { JsonSerializer serializer = new JsonSerializer(); using (JsonReader reader = new JsonTextReader(new StreamReader(path))) { bookShelf = (BookShelf)serializer.Deserialize(reader); } }
private void ReadXML(string path) { XmlSerializer xmlSerializer = new XmlSerializer(typeof(BookShelf)); using (StreamReader sr = new StreamReader(path)) { bookShelf = (BookShelf)xmlSerializer.Deserialize(sr); } }
public BookShelfService(BookShelf bookShelf) { this.bookShelf = bookShelf; }