/// <summary> /// Gets the state. /// </summary> /// <param name="stateContent">Content of the state.</param> /// <returns>GenericState<T>.</returns> public static GenericState <T> GetState(T stateContent) { if (StatesHashTable.ContainsKey(stateContent)) { return(StatesHashTable[stateContent]); } var newState = new GenericState <T>(stateContent); StatesHashTable.Add(stateContent, newState); return(newState); }
/// <summary> /// Equalses the specified s according to its content. /// </summary> /// <param name="s">The s.</param> /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns> public bool Equals(GenericState <T> s) { return(StateContent.Equals(s.StateContent)); }