create an asp.net service of a state manager that contain any data with methods to operate state in csharp

main.cs
public class StateManager
{
    private static Dictionary<string, object> _stateDictionary = new Dictionary<string, object>();

    public static void SetValue(string key, object value)
    {
        if (_stateDictionary.ContainsKey(key))
        {
            _stateDictionary[key] = value;
        }
        else
        {
            _stateDictionary.Add(key, value);
        }
    }

    public static object GetValue(string key)
    {
        if (_stateDictionary.ContainsKey(key))
        {
            return _stateDictionary[key];
        }

        return null;
    }

    public static void RemoveValue(string key)
    {
        if (_stateDictionary.ContainsKey(key))
        {
            _stateDictionary.Remove(key);
        }
    }

    public static void ClearState()
    {
        _stateDictionary.Clear();
    }
}
831 chars
40 lines

gistlibby LogSnag