public bool Equals(SketchRelationEntityVO other)
        {
            if (other == null)
            {
                return(false);
            }

            if (this.name != other.name)
            {
                return(false);
            }

            if (this.sketchName != other.sketchName)
            {
                return(false);
            }

            if (!this.id.SequenceEqual(other.id))
            {
                return(false);
            }

            if (this.type != other.type)
            {
                return(false);
            }

            if (this.typeName != other.typeName)
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
        public bool Equals(RelationVO other)
        {
            if (other == null)
            {
                return(false);
            }

            if (other.type != this.type)
            {
                return(false);
            }

            if (other.typeName != this.typeName)
            {
                return(false);
            }

            if (other.dimensionValue != this.dimensionValue)
            {
                return(false);
            }

            if (other.entities != null && this.entities != null)
            {
                if (other.entities.Count == this.entities.Count)
                {
                    for (int i = 0; i < this.entities.Count; i++)
                    {
                        SketchRelationEntityVO entity = this.entities.ElementAt(i);
                        if (!other.entities.Contains(entity))
                        {
                            return(false);
                        }
                    }
                }
            }


            return(true);
        }