internal static DM.PersonalCommunication Build(SM.PersonalCommunication personalCommunication) { if (personalCommunication != null) { List <DM.Creator> creators = new List <DM.Creator>(); creators.AddRange(personalCommunication.Authors != null ? personalCommunication.Authors.Select(x => Build(x, DE.CreatorType.Author)).ToList() : new List <DM.Creator>()); creators.AddRange(personalCommunication.Translators != null ? personalCommunication.Translators.Select(x => Build(x, DE.CreatorType.Translator)).ToList() : new List <DM.Creator>()); creators.AddRange(personalCommunication.Recipients != null ? personalCommunication.Recipients.Select(x => Build(x, DE.CreatorType.Recipient)).ToList() : new List <DM.Creator>()); return(new DM.PersonalCommunication() { TitleFull = personalCommunication.TitleFull, TitleShort = personalCommunication.TitleShort, Creators = creators, AccessedDate = Build(personalCommunication.AccessedDate), IssuedDate = Build(personalCommunication.IssuedDate), Abstract = personalCommunication.Abstract, Language = personalCommunication.Language, Note = personalCommunication.Note, URL = personalCommunication.URL, CallNumber = personalCommunication.CallNumber, ArchiveName = personalCommunication.ArchiveName, ArchiveLocation = personalCommunication.ArchiveLocation, Genre = personalCommunication.Genre, Source = personalCommunication.Source }); } else { return(null); } }
public SM.Citation PersonalCommunication(SE.Style style, SE.Format format, [FromBody] SM.PersonalCommunication personalCommunication) { return(_citationManager.CreateCitationPersonalCommunication(style, format, personalCommunication)); }
internal SM.Citation CreateCitationPersonalCommunication(SE.Style style, SE.Format format, SM.PersonalCommunication personalCommunication) { return(ContentItemFactory.Build(_citationProcessor.CreateCitationPersonalCommunication(ContentItemFactory.Build(style), ContentItemFactory.Build(format), ContentItemFactory.Build(personalCommunication)))); }