Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        /// <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;
        }
Ejemplo n.º 3
0
        /// <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;
        }