/// <summary> /// Returns <see langword="true"/> if the supplied stateless sessions are equal, <see langword="false"/> otherwise. /// </summary> /// <param name="left">The left.</param> /// <param name="right">The right.</param> /// <returns></returns> public static bool AreEqual(IStatelessSession left, IStatelessSession right) { StatelessSessionDelegate ssdLeft = left as StatelessSessionDelegate; StatelessSessionDelegate ssdRight = right as StatelessSessionDelegate; if (ssdLeft != null && ssdRight != null) { return(Object.ReferenceEquals(ssdLeft._innerSession, ssdRight._innerSession)); } else { throw new NotSupportedException("AreEqual: left is " + left.GetType().Name + " and right is " + right.GetType().Name); } }