Exemplo n.º 1
0
        private IEnumerable <TNavigationItem> CreateNavigation()
        {
            var navItems = _provider.CreateNavigation();

            if (navItems != null)
            {
                var resourceType = _options.ResourceType;
                if (resourceType != null)
                {
                    var resourceManager = ResourceProvider.TryGetResourceManager(resourceType);
                    if (resourceManager != null)
                    {
                        LoadResource(navItems, resourceManager);
                        foreach (var navItem in navItems)
                        {
                            LoadResource(navItem.Descendants, resourceManager);
                        }
                    }
                }
            }

            return(navItems);
        }