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); }
public bool Contains(StateItemKey key) => ContainsKey(key.ToString());