コード例 #1
0
        public static IMenuFacade GetMenuByName(this IFrameworkFacade frameworkFacade, string menuName)
        {
            if (string.IsNullOrEmpty(menuName))
            {
                throw new BadRequestNOSException();
            }

            var menu = frameworkFacade.GetMainMenus().List.SingleOrDefault(m => m.Id == menuName);

            return(menu ?? throw new MenuResourceNotFoundNOSException(menuName));
        }