public override int GetHashCode() { unchecked { var hash = 13; hash = (hash * 397) ^ Type.GetHashCode(); switch (Type) { case VariableType.Boolean: hash = (hash * 397) ^ Boolean.GetHashCode(); break; case VariableType.Integer: hash = (hash * 397) ^ Integer.GetHashCode(); break; case VariableType.Number: hash = (hash * 397) ^ Number.GetHashCode(); break; case VariableType.String: hash = (hash * 397) ^ String.GetHashCode(); break; case VariableType.Object: hash = (hash * 397) ^ ComponentHelper.GetAsBaseObject(Object).GetHashCode(); break; case VariableType.Store: hash = (hash * 397) ^ Store.GetHashCode(); break; } return(hash); } }
public bool Equals(Object value) { return(Type == VariableType.Object && (Object == value || ComponentHelper.GetAsBaseObject(Object) == ComponentHelper.GetAsBaseObject(value))); }