public static async Task <EBook> CreateEBook(IStorageItem item) { EBook returnValue = new EBook(); await returnValue.Load(item); return(returnValue); }
public Entry(EBook book) { _author = book.Author; // TODO: copy the relevant data here. //_cover = bookMetaData.Cover.SomeStuff; _identifier = book.Identifier; _language = (CultureInfo)(book.Language == null ? null : book.Language.Clone()); _legal = book.Legal; _publicationDate = book.PublicationDate; _publisher = book.Publisher; _title = book.Title; book.Entry = this; }
public Entry this[EBook index] { get { return _entriesByPath[index.Path]; } set { if (null == index) { // Ignore. return; } if (!Contains(index)) { _entriesByPath.Add(index.Path, value); EntryAdded(value); return; } Entry current = _entriesByPath[index.Path]; if (null == value) { // Remove the entry. _entriesByPath.Remove(index.Path); EntryRemoved(current); } else { if (!current.Equals(value)) { // Update the entry. _entriesByPath[index.Path] = value; EntryChanged(value); } } } }
public bool Contains(EBook book) { return _entriesByPath.ContainsKey(book.Path); }
public static async Task<EBook> CreateEBook(IStorageItem item) { EBook returnValue = new EBook(); await returnValue.Load(item); return returnValue; }