Exemple #1
0
 public override string ToString()
 {
     if (LazyList.Size(nested) > 0)
     {
         return("NJetty.Util.Util.MultiException"
                + LazyList.GetList(nested));
     }
     return("NJetty.Util.Util.MultiException[]");
 }
Exemple #2
0
        public new bool TryGetValue(K key, out object value)
        {
            object l = _map.TryGetValue(key, out value);

            switch (LazyList.Size(l))
            {
            case 0:
                return(false);

            case 1:
                value = LazyList.Get(l, 0);
                return(true);

            default:
                value = LazyList.GetList(l, true);
                return(true);
            }
        }
Exemple #3
0
        public new object this[K name]
        {
            get
            {
                object l = _map.ContainsKey(name) ? _map[name] : null;
                switch (LazyList.Size(l))
                {
                case 0:
                    return(null);

                case 1:
                    object o = LazyList.Get(l, 0);
                    return(o);

                default:
                    return(LazyList.GetList(l, true));
                }
            }
            set
            {
                Add(name, value);
            }
        }
Exemple #4
0
 /// <summary>
 /// Get multiple values.
 /// Single valued entries are converted to singleton lists.
 /// </summary>
 /// <param name="name">The entry key.</param>
 /// <returns>Unmodifieable List of values.</returns>
 public List <object> GetValues(K name)
 {
     return(LazyList.GetList(_map[name], true));
 }