/// <summary> /// Remove an item to storage using the specified unique key. /// </summary> /// <param name="key"> /// Unique identifier of the item. /// </param> public void Remove(string key) { if (!stateStorage.ContainsKey(key)) { throw new KeyNotFoundException(RM.Get_Error_KeyNotFound(key)); } stateStorage.Remove(key); }
/// <summary> /// Update an item in storage using the specified unique key. /// </summary> /// <param name="key"> /// Unique identifier of the item to update. /// </param> /// <param name="value"> /// The item to update. /// </param> public void Update <T>(string key, T value) { if (!stateStorage.ContainsKey(key)) { throw new KeyNotFoundException(RM.Get_Error_KeyNotFound(key)); } stateStorage[key] = value; }
/// <summary> /// Update an item in storage using the specified unique key. /// </summary> /// <param name="key"> /// Unique identifier of the item to update. /// </param> /// <param name="value"> /// The item to update. /// </param> public void Update(String key, Object value) { if (!_stateStorage.ContainsKey(key)) { throw new KeyNotFoundException(RM.Get_Error_KeyNotFound(key)); } _stateStorage[key] = value; }