Exemplo n.º 1
0
        /// <summary>
        /// Returns the label with the given name.
        ///
        /// Throws KeyNotFoundException if no label by that name is found".
        /// </summary>
        public Label this[string name]
        {
            get
            {
                if (!InnerLookup.ContainsKey(name))
                {
                    throw new KeyNotFoundException("No label with name '" + name + "' found");
                }

                return(InnerLookup[name]);
            }
        }
Exemplo n.º 2
0
 public IEnumerator <IGrouping <keyˈ, valueˈ> > GetEnumerator() => InnerLookup.Where(g => Filter(g.Key)).GetEnumerator();
Exemplo n.º 3
0
 public bool Contains(keyˈ key) => Filter(key) && InnerLookup.Contains(key);
Exemplo n.º 4
0
 public IEnumerable <valueˈ> this[keyˈ key] => Filter(key) ? InnerLookup.Get(key) : Enumerable.Empty <valueˈ>();
Exemplo n.º 5
0
 public IEnumerator <IGrouping <keyˈ, valueˈ> > GetEnumerator() =>
 InnerLookup.Select(g => g.Map(g.Key, (k, v) => Projection(k, v))).GetEnumerator();
Exemplo n.º 6
0
 public bool Contains(keyˈ key) => InnerLookup.Contains(key);