public bool Equals(
            PropertyInfo x,
            PropertyInfo y)
        {
            if (ReferenceEquals(x, y))
            {
                return(true);
            }

            if (x == null ||
                y == null)
            {
                return(false);
            }

            var entityComparer = new EntityInfoComparer();

            if (x.Id != y.Id ||
                x.IsCollection != y.IsCollection ||
                x.IsKey != y.IsKey ||
                x.IsRequired != y.IsRequired ||
                x.Minimum != y.Minimum ||
                x.Maximum != y.Maximum ||
                !entityComparer.Equals(
                    x.Target,
                    y.Target) ||
                x.ModelProperty != y.ModelProperty)
            {
                return(false);
            }

            return(true);
        }
示例#2
0
        public bool Equals(
            EntityInfo x,
            EntityInfo y)
        {
            if (ReferenceEquals(x, y))
            {
                return(true);
            }

            if (x == null ||
                y == null)
            {
                return(false);
            }

            var entityComparer        = new EntityInfoComparer();
            var propertyListComparer  = new PropertyInfoListComparer();
            var referenceListComparer = new ReferenceInfoListComparer();
            var valueListComparer     = new ValueInfoListComparer();

            if (x.Id != y.Id ||
                x.Extends != y.Extends ||
                x.Description != y.Description ||
                !entityComparer.Equals(
                    x.BaseEntity,
                    y.BaseEntity) ||
                x.IsAbstract != y.IsAbstract ||
                x.IsEnum != y.IsEnum ||
                !propertyListComparer.Equals(
                    x.Properties,
                    y.Properties) ||
                !referenceListComparer.Equals(
                    x.References,
                    y.References) ||
                !valueListComparer.Equals(
                    x.Values,
                    y.Values))
            {
                return(false);
            }

            return(true);
        }
        public bool Equals(
            LayoutInfo x,
            LayoutInfo y)
        {
            if (ReferenceEquals(x, y))
            {
                return(true);
            }

            if (x == null ||
                y == null)
            {
                return(false);
            }

            var entityComparer     = new EntityInfoComparer();
            var actionListComparer = new ActionListComparer();
            var concernComparer    = new ConcernInfoComparer();

            if (x.Title != y.Title ||
                x.Description != y.Description ||
                x.IsVisibleInMenu != y.IsVisibleInMenu ||
                x.IsRoot != y.IsRoot ||
                !ReferenceEquals(
                    x.Parent,
                    y.Parent) ||
                !actionListComparer.Equals(
                    x.Actions,
                    y.Actions) ||
                !entityComparer.Equals(
                    x.DataModel,
                    y.DataModel) ||
                !concernComparer.Equals(
                    x.Concern,
                    y.Concern))
            {
                return(false);
            }

            return(true);
        }
示例#4
0
        public bool Equals(
            ReferenceInfo x,
            ReferenceInfo y)
        {
            bool result = base.Equals(x, y);

            var entityComparer   = new EntityInfoComparer();
            var propertyComparer = new PropertyInfoComparer();

            if (x.ForeignKey != y.ForeignKey ||
                !propertyComparer.Equals(
                    x.Property,
                    y.Property) ||
                !entityComparer.Equals(
                    x.Reference,
                    y.Reference))
            {
                return(false);
            }

            return(result);
        }