Ejemplo n.º 1
0
            /// <summary>
            /// Gets the state.
            /// </summary>
            /// <param name="stateContent">Content of the state.</param>
            /// <returns>GenericState&lt;T&gt;.</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);
            }
Ejemplo n.º 2
0
 /// <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));
 }