Exemple #1
0
        public KeyValuePair <StateItemKey, Object> Add(Type type, string key, object value)
        {
            if (Contains(type, key))
            {
                throw new ArgumentException("Same type+key exists.");
            }
            var stateKey = new StateItemKey(type, key);

            Add(stateKey.ToString(), value);
            var item = new KeyValuePair <StateItemKey, object>(stateKey, value);

            return(item);
        }
Exemple #2
0
 public bool Contains(StateItemKey key) => ContainsKey(key.ToString());