Exemplo n.º 1
0
        public void Add(string key, object value)
        {
            if (!Структура.IsPropertyNameValid(key))
            {
                throw new ArgumentException("Недопустимое имя поля.", "key");
            }

            ((IDictionary <string, object>) this.values).Add(key, value);
        }
Exemplo n.º 2
0
        public void Add(KeyValuePair <string, object> item)
        {
            if (!Структура.IsPropertyNameValid(item.Key))
            {
                throw new ArgumentException("Недопустимое имя поля.", "key");
            }

            ((IDictionary <string, object>) this.values).Add(item);
        }
Exemplo n.º 3
0
        public object this[string key] {
            get {
                if (!Структура.IsPropertyNameValid(key))
                {
                    throw new ArgumentException("Недопустимое имя поля.", "key");
                }

                return(((IDictionary <string, object>) this.values)[key]);
            }
            set {
                if (!Структура.IsPropertyNameValid(key))
                {
                    throw new ArgumentException("Недопустимое имя поля.", "key");
                }

                ((IDictionary <string, object>) this.values)[key] = value;
            }
        }