Exemple #1
0
        public ITagGroup Get(string group, ParseContext context = null)
        {
            var matches = _stack.Where(l => l.Exists(group)).ToList();

            if (matches.Count == 1)
            {
                return(matches.Single().Get(group, context));
            }
            if (matches.Count > 0)
            {
                var groups = matches.Select(lib => lib.Get(group, context)).ToList();
                var tags   = groups.SelectMany(grp => grp.ToList()).ToArray();
                return(new CombinedTagGroup(group, tags));
            }
            if (context != null)
            {
                throw TagException.UnkownTagGroup(group).Decorate(context);
            }
            return(null);
        }