Exemple #1
0
        public void EqualsTest()
        {
            long             line_start  = 9999999999;
            int              index_start = 999999999;
            CElementPosition first       = new CElementPosition(line_start, index_start);
            CElementPosition second      = new CElementPosition(line_start, index_start);

            Assert.IsTrue(first.Equals(second));
        }
Exemple #2
0
        /// <summary>
        /// Определяет, равны ли 2 фрагмента кода
        /// </summary>
        /// <param name="other"></param>
        /// <returns></returns>
        public bool Equals(CCommentedCodeFragment other)
        {
            if (other == null)
            {
                return(false);
            }

            if (Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            return(m_CommentSymbolPair.Equals(other.m_CommentSymbolPair) && m_Position.Equals(other.m_Position));
        }