예제 #1
0
        public static INavigationDefinition AddBuilder(this INavigationDefinition navItem, Action <NavigationItemBuilder> builderAction)
        {
            var navigationItemBuilder = new NavigationItemBuilder();

            builderAction(navigationItemBuilder);
            var navigationItem = navigationItemBuilder.Build();

            if (navItem.Items.Any(i => i.GetUniqueId() == navigationItem.GetUniqueId()))
            {
                throw new BlocksException(StringLocal.Format("System find navigatiomItems has same Id \"{0}\"", navigationItem.GetUniqueId()));
            }
            navItem.AddItem(navigationItem);
            return(navItem);
        }