internal static DM.LegalCase Build(SM.LegalCase legalCase) { if (legalCase != null) { List <DM.Creator> creators = new List <DM.Creator>(); creators.AddRange(legalCase.Authors != null ? legalCase.Authors.Select(x => Build(x, DE.CreatorType.Author)).ToList() : new List <DM.Creator>()); creators.AddRange(legalCase.Translators != null ? legalCase.Translators.Select(x => Build(x, DE.CreatorType.Translator)).ToList() : new List <DM.Creator>()); return(new DM.LegalCase() { TitleFull = legalCase.TitleFull, TitleShort = legalCase.TitleShort, Creators = creators, AccessedDate = Build(legalCase.AccessedDate), IssuedDate = Build(legalCase.IssuedDate), Abstract = legalCase.Abstract, Language = legalCase.Language, Note = legalCase.Note, URL = legalCase.URL, ContainerTitle = legalCase.ContainerTitle, PageNumber = legalCase.PageNumber, Number = legalCase.Number, References = legalCase.References, VolumeNumber = legalCase.VolumeNumber, Authority = legalCase.Authority }); } else { return(null); } }
public SM.Citation LegalCase(SE.Style style, SE.Format format, [FromBody] SM.LegalCase legalCase) { return(_citationManager.CreateCitationLegalCase(style, format, legalCase)); }
internal SM.Citation CreateCitationLegalCase(SE.Style style, SE.Format format, SM.LegalCase legalCase) { return(ContentItemFactory.Build(_citationProcessor.CreateCitationLegalCase(ContentItemFactory.Build(style), ContentItemFactory.Build(format), ContentItemFactory.Build(legalCase)))); }