Example #1
0
        /// <summary>
        /// Porównuje czy jeden System.Object jest równy drugiemu.
        /// </summary>
        /// <param name="o">System.Object do porównania.</param>
        /// <returns>Równy czy nie.</returns>
        public override bool Equals(object obj)
        {
            SubtitlesContentModification other = obj as SubtitlesContentModification;

            if (other != null)
            {
                return(Equals(other));
            }
            else
            {
                return(false);
            }
        }
Example #2
0
        /// <summary>
        /// Porównuje czy jeden obiekt SubtitlesContentModification jest równy drugiemu.
        /// </summary>
        /// <param name="other">Obiekt Selection do porównania.</param>
        /// <returns>Równy czy nie.</returns>
        public bool Equals(SubtitlesContentModification other)
        {
            if ((other != null) &&
                (this.contentChanges.Count == other.contentChanges.Count))
            {
                //Modyfikcacje zawartości powinny cechować tylko dokonanae zmiany, cel jest nie istotny...
                //Reszta zmiennych jest potrzebna zeby uzyskać liste zmian.
                var  thisChangesSet = new HashSet <Tuple <Diff, int> >(this.contentChanges);
                bool areEquals      = thisChangesSet.SetEquals(other.contentChanges);

                return(areEquals);
            }
            else
            {
                return(false);
            }
        }