Exemple #1
0
 private NonFictionBook ConvertToNonFictionBook(JsonApiNonFictionBook jsonApiNonFictionBook)
 {
     return(new NonFictionBook
     {
         Title = jsonApiNonFictionBook.Title,
         VolumeInfo = jsonApiNonFictionBook.VolumeInfo,
         Series = jsonApiNonFictionBook.Series,
         Periodical = jsonApiNonFictionBook.Periodical,
         Authors = jsonApiNonFictionBook.Authors,
         Year = jsonApiNonFictionBook.Year,
         Edition = jsonApiNonFictionBook.Edition,
         Publisher = jsonApiNonFictionBook.Publisher,
         City = jsonApiNonFictionBook.City,
         Pages = jsonApiNonFictionBook.Pages,
         PagesInFile = jsonApiNonFictionBook.PagesInFile,
         Language = jsonApiNonFictionBook.Language,
         Topic = jsonApiNonFictionBook.Topic,
         Library = jsonApiNonFictionBook.Library,
         Issue = jsonApiNonFictionBook.Issue,
         Identifier = jsonApiNonFictionBook.Identifier,
         Issn = jsonApiNonFictionBook.Issn,
         Asin = jsonApiNonFictionBook.Asin,
         Udc = jsonApiNonFictionBook.Udc,
         Lbc = jsonApiNonFictionBook.Lbc,
         Ddc = jsonApiNonFictionBook.Ddc,
         Lcc = jsonApiNonFictionBook.Lcc,
         Doi = jsonApiNonFictionBook.Doi,
         GoogleBookId = jsonApiNonFictionBook.GoogleBookId,
         OpenLibraryId = jsonApiNonFictionBook.OpenLibraryId,
         Commentary = jsonApiNonFictionBook.Commentary,
         Dpi = jsonApiNonFictionBook.Dpi,
         Color = jsonApiNonFictionBook.Color,
         Cleaned = jsonApiNonFictionBook.Cleaned,
         Orientation = jsonApiNonFictionBook.Orientation,
         Paginated = jsonApiNonFictionBook.Paginated,
         Scanned = jsonApiNonFictionBook.Scanned,
         Bookmarked = jsonApiNonFictionBook.Bookmarked,
         Searchable = jsonApiNonFictionBook.Searchable,
         SizeInBytes = jsonApiNonFictionBook.SizeInBytes,
         Format = jsonApiNonFictionBook.Format,
         Md5Hash = jsonApiNonFictionBook.Md5Hash,
         Generic = jsonApiNonFictionBook.Generic,
         Visible = jsonApiNonFictionBook.Visible,
         Locator = jsonApiNonFictionBook.Locator,
         Local = jsonApiNonFictionBook.Local,
         AddedDateTime = DateTime.ParseExact(jsonApiNonFictionBook.AddedDateTime, "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture),
         LastModifiedDateTime = DateTime.ParseExact(jsonApiNonFictionBook.LastModifiedDateTime, "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture),
         CoverUrl = jsonApiNonFictionBook.CoverUrl,
         Tags = jsonApiNonFictionBook.Tags,
         IdentifierPlain = jsonApiNonFictionBook.IdentifierPlain,
         LibgenId = jsonApiNonFictionBook.LibgenId
     });
 }
Exemple #2
0
 private NonFictionBook ConvertToNonFictionBook(JsonApiNonFictionBook jsonApiNonFictionBook)
 {
     return(new NonFictionBook
     {
         Title = jsonApiNonFictionBook.Title ?? String.Empty,
         VolumeInfo = jsonApiNonFictionBook.VolumeInfo ?? String.Empty,
         Series = jsonApiNonFictionBook.Series ?? String.Empty,
         Periodical = jsonApiNonFictionBook.Periodical ?? String.Empty,
         Authors = jsonApiNonFictionBook.Authors ?? String.Empty,
         Year = jsonApiNonFictionBook.Year ?? String.Empty,
         Edition = jsonApiNonFictionBook.Edition ?? String.Empty,
         Publisher = jsonApiNonFictionBook.Publisher ?? String.Empty,
         City = jsonApiNonFictionBook.City ?? String.Empty,
         Pages = jsonApiNonFictionBook.Pages ?? String.Empty,
         PagesInFile = jsonApiNonFictionBook.PagesInFile,
         Language = jsonApiNonFictionBook.Language ?? String.Empty,
         Topic = jsonApiNonFictionBook.Topic ?? String.Empty,
         Library = jsonApiNonFictionBook.Library ?? String.Empty,
         Issue = jsonApiNonFictionBook.Issue ?? String.Empty,
         Identifier = jsonApiNonFictionBook.Identifier ?? String.Empty,
         Issn = jsonApiNonFictionBook.Issn ?? String.Empty,
         Asin = jsonApiNonFictionBook.Asin ?? String.Empty,
         Udc = jsonApiNonFictionBook.Udc ?? String.Empty,
         Lbc = jsonApiNonFictionBook.Lbc ?? String.Empty,
         Ddc = jsonApiNonFictionBook.Ddc ?? String.Empty,
         Lcc = jsonApiNonFictionBook.Lcc ?? String.Empty,
         Doi = jsonApiNonFictionBook.Doi ?? String.Empty,
         GoogleBookId = jsonApiNonFictionBook.GoogleBookId ?? String.Empty,
         OpenLibraryId = jsonApiNonFictionBook.OpenLibraryId ?? String.Empty,
         Commentary = jsonApiNonFictionBook.Commentary ?? String.Empty,
         Dpi = jsonApiNonFictionBook.Dpi,
         Color = jsonApiNonFictionBook.Color ?? String.Empty,
         Cleaned = jsonApiNonFictionBook.Cleaned ?? String.Empty,
         Orientation = jsonApiNonFictionBook.Orientation ?? String.Empty,
         Paginated = jsonApiNonFictionBook.Paginated ?? String.Empty,
         Scanned = jsonApiNonFictionBook.Scanned ?? String.Empty,
         Bookmarked = jsonApiNonFictionBook.Bookmarked ?? String.Empty,
         Searchable = jsonApiNonFictionBook.Searchable ?? String.Empty,
         SizeInBytes = jsonApiNonFictionBook.SizeInBytes,
         Format = jsonApiNonFictionBook.Format ?? String.Empty,
         Md5Hash = jsonApiNonFictionBook.Md5Hash ?? String.Empty,
         Generic = jsonApiNonFictionBook.Generic ?? String.Empty,
         Visible = jsonApiNonFictionBook.Visible ?? String.Empty,
         Locator = jsonApiNonFictionBook.Locator ?? String.Empty,
         Local = jsonApiNonFictionBook.Local,
         AddedDateTime = ParseDateTime(jsonApiNonFictionBook.AddedDateTime),
         LastModifiedDateTime = ParseDateTime(jsonApiNonFictionBook.LastModifiedDateTime),
         CoverUrl = jsonApiNonFictionBook.CoverUrl,
         Tags = jsonApiNonFictionBook.Tags,
         IdentifierPlain = jsonApiNonFictionBook.IdentifierPlain,
         LibgenId = jsonApiNonFictionBook.LibgenId
     });
 }