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