// A substate evaluates equality simply if the other is of the same type. // Ex. a GX_Recovery type will be returned from GetType(), as each Substate implements it's own type. // The base.Equals function cannot be reliably used, as the parameters of each individual state // such as time-to-live may have been modified when slotted into the StateFrame. public override bool Equals(object other) { Substate otherState = other as Substate; return(otherState.GetType() == this.GetType()); }