예제 #1
0
 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));
     }
 }
예제 #2
0
 /// <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));
         }
     }
 }
예제 #3
0
        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)));
        }
예제 #4
0
 public int GetHashCode(IFrameTransformation transformation)
 {
     return(transformation.BaseFrame.GetHashCode()
            ^ transformation.ToFrame.GetHashCode());
 }
예제 #5
0
 public bool IsValidTransformation(IFrameTransformation obj)
 {
     return(IsValidTransformation(obj.BaseFrame, obj.ToFrame));
 }
예제 #6
0
 public void FrameTransitionCheck(IFrameTransformation other)
 {
     fth.FrameTransitionCheck(other);
 }
예제 #7
0
 public void FrameEqualityCheck(IFrameTransformation other)
 {
     fth.FrameEqualityCheck(other);
 }