コード例 #1
0
 internal static DM.Legislation Build(SM.Legislation legislation)
 {
     if (legislation != null)
     {
         List <DM.Creator> creators = new List <DM.Creator>();
         creators.AddRange(legislation.Authors != null ? legislation.Authors.Select(x => Build(x, DE.CreatorType.Author)).ToList() : new List <DM.Creator>());
         creators.AddRange(legislation.Translators != null ? legislation.Translators.Select(x => Build(x, DE.CreatorType.Translator)).ToList() : new List <DM.Creator>());
         return(new DM.Legislation()
         {
             TitleFull = legislation.TitleFull,
             TitleShort = legislation.TitleShort,
             Creators = creators,
             AccessedDate = Build(legislation.AccessedDate),
             IssuedDate = Build(legislation.IssuedDate),
             Abstract = legislation.Abstract,
             Language = legislation.Language,
             Note = legislation.Note,
             URL = legislation.URL,
             ContainerTitle = legislation.ContainerTitle,
             PageNumber = legislation.PageNumber,
             Number = legislation.Number,
             References = legislation.References,
             VolumeNumber = legislation.VolumeNumber,
             ChapterNumber = legislation.ChapterNumber,
             Section = legislation.Section
         });
     }
     else
     {
         return(null);
     }
 }
コード例 #2
0
 public SM.Citation Legislation(SE.Style style, SE.Format format, [FromBody] SM.Legislation legislation)
 {
     return(_citationManager.CreateCitationLegislation(style, format, legislation));
 }
コード例 #3
0
 internal SM.Citation CreateCitationLegislation(SE.Style style, SE.Format format, SM.Legislation legislation)
 {
     return(ContentItemFactory.Build(_citationProcessor.CreateCitationLegislation(ContentItemFactory.Build(style),
                                                                                  ContentItemFactory.Build(format),
                                                                                  ContentItemFactory.Build(legislation))));
 }