public Publication Construct( BibTexEntryType type, string doi, string title, List <Author> authors, int?year, int?month, int?day, string journal, string volume, int?number, string chapter, string pages, string publisher, List <Keyword> keywords) { return(new Publication() { Type = type, DOI = doi, Title = title, Authors = authors, Year = year, Month = month, Day = day, Journal = journal, Volume = volume, Number = number, Chapter = chapter, Pages = pages, Publisher = publisher, Keywords = keywords }); }
public void ExtractType(string bibitem, BibTexEntryType expValue) { // Act var success = _parser.TryParse(bibitem, out Publication pub); // Assert Assert.True(success); Assert.Equal(expValue, pub.Type); }
private static bool TryGetType(string input, out BibTexEntryType type) { if (!Enum.TryParse(input, ignoreCase: true, out type)) { type = BibTexEntryType.Unknown; return(false); } else { return(true); } }
public ParsedPublication( string pubMedID = default, string eID = default, string scopusID = default, BibTexEntryType type = default, string title = default, int?year = default, int?month = default, int citedBy = default, string doi = default, string bibTeXEntry = default, string journal = default, string volume = default, int?number = default, string chapter = default, string pages = default, string publisher = default, ICollection <Citation> citations = default, List <Author> authors = default, List <Keyword> keywords = default, ICollection <ToolPublicationAssociation> toolAssociations = default) { PubMedID = pubMedID; EID = eID; ScopusID = scopusID; Type = type; Title = title; Year = year; Month = month; CitedBy = citedBy; DOI = doi; BibTeXEntry = bibTeXEntry; Journal = journal; Volume = volume; Number = number; Chapter = chapter; Pages = pages; Publisher = publisher; Citations = citations; Authors = authors; Keywords = keywords; ToolAssociations = toolAssociations; }