protected bool EqualsEx(object left, object right)
        {
            if (left == null && right == null)
            {
                return(true);
            }
            if (left == null || right == null)
            {
                return(false);
            }

            if (object.ReferenceEquals(left, right))
            {
                return(true);
            }
            if (object.Equals(left, right))
            {
                return(true);
            }

            if (left is Ex.IRow && right is Ex.IRow)
            {
                Ex.IRow lRow = left as Ex.IRow;
                Ex.IRow rRow = right as Ex.IRow;

                return(lRow.Key == rRow.Key && lRow.Sheet.Name == rRow.Sheet.Name);
            }

            int iLeft, iRight;

            if (TryConvert(left, out iLeft) && TryConvert(right, out iRight))
            {
                return(iLeft == iRight);
            }

            if (!(left is string) && !(left is string))
            {
                return(false);
            }
            string sLeft  = left.ToString();
            string sRight = right.ToString();

            return(string.Equals(sLeft, sRight));
        }
Esempio n. 2
0
        void WriteSubRowKey(StreamWriter s, Ex.IRow row)
        {
            var subRow = (Ex.Variant2.SubRow)row;

            s.Write(subRow.FullKey);
        }
Esempio n. 3
0
 void WriteRowKey(StreamWriter s, Ex.IRow row)
 {
     s.Write(row.Key);
 }