Ejemplo n.º 1
0
        public void CleanUp(string currentPath, string jsonLanguageRecord)
        {
            var invalids = Children.Where(n => !n.IsValid).ToArray();

            foreach (var inv in invalids)
            {
                Children.Remove(inv);
            }

            Active = Url?.Equals(currentPath, StringComparison.OrdinalIgnoreCase) ?? false;
            Children.ForEach(n => n.CleanUp(currentPath, jsonLanguageRecord));
            if (!Active)
            {
                Active = Children.Any(c => c.Active);
            }

            DisplayName = DisplayName.Translate(jsonLanguageRecord);
        }