示例#1
0
 public static MenuSectionItem CreateMenuSectionItem(string name, MenuSection menuSection, int?pageId)
 {
     if (menuSection.Id == 0)
     {
         throw new InvalidOperationException(nameof(menuSection));
     }
     return(new MenuSectionItem()
     {
         Name = name,
         MenuSection = menuSection,
         PageId = pageId
     });
 }
示例#2
0
 public static MenuSectionContent CreateMenuSectionContent(string lang, string displayText, MenuSection menuSection)
 {
     if (menuSection.Id == 0)
     {
         throw new NullReferenceException(nameof(menuSection));
     }
     return(new MenuSectionContent()
     {
         Lang = lang,
         DisplayText = displayText,
         MenuSection = menuSection
     });
 }