public void FrameEqualityCheck(IFrameTransformation other) { if (!this.Equals(other)) { throw new ArgumentException("base and to frames must match but are \"" + BaseFrame + "\"/\"" + other.BaseFrame + "\", \"" + ToFrame + "\"/\"" + other.ToFrame + "\"", nameof(other)); } }
/// <summary> /// Verifies the given nextFrame transformation can be applied against this transformation /// in order to create a valid new transformation. /// </summary> /// <param name="nextFrame"></param> public void FrameTransitionCheck(IFrameTransformation nextFrame) { if (!ToFrame.Equals(nextFrame.BaseFrame)) { if (!ToFrame.Equals(nextFrame.BaseFrame)) { throw new ArgumentException("the to frame of this frame must the same as the base of the frame transformation, but are \"" + ToFrame + "\" and \"" + nextFrame.BaseFrame + "\"", nameof(nextFrame)); } } }
public override bool Equals(object obj) { if (!(obj is IFrameTransformation)) { return(false); } IFrameTransformation other = (IFrameTransformation)obj; return((BaseFrame == other.BaseFrame || BaseFrame.Equals(other.BaseFrame)) && (ToFrame == other.ToFrame || ToFrame.Equals(other.ToFrame))); }
public int GetHashCode(IFrameTransformation transformation) { return(transformation.BaseFrame.GetHashCode() ^ transformation.ToFrame.GetHashCode()); }
public bool IsValidTransformation(IFrameTransformation obj) { return(IsValidTransformation(obj.BaseFrame, obj.ToFrame)); }
public void FrameTransitionCheck(IFrameTransformation other) { fth.FrameTransitionCheck(other); }
public void FrameEqualityCheck(IFrameTransformation other) { fth.FrameEqualityCheck(other); }