Пример #1
0
        protected override void InternalAssignFrom(DefaultableMulti other)
        {
            base.InternalAssignFrom(other);
            PropertyRangeConstraint otherConstraint = other as PropertyRangeConstraint;

            if (otherConstraint != null)
            {
                this.Min = (ObjectValueInfo)otherConstraint.Min.Clone();
                this.Max = (ObjectValueInfo)otherConstraint.Max.Clone();
            }
        }
Пример #2
0
        protected override bool InternalEqualsTo(DefaultableMulti other)
        {
            bool equals = base.InternalEqualsTo(other);

            PropertyRangeConstraint otherConstraint = other as PropertyRangeConstraint;

            if (equals && otherConstraint != null)
            {
                equals = this.Min.EqualsTo(otherConstraint.Min) &&
                         this.Max.EqualsTo(otherConstraint.Max);
            }

            return(equals);
        }
Пример #3
0
        protected override void InternalMergeChanges(ref PropertyConstraint mergedConstraint, PropertyConstraint otherConstraint,
                                                     MergeConflictAction mergeConflictAction)
        {
            PropertyRangeConstraint other  = (PropertyRangeConstraint)otherConstraint;
            PropertyRangeConstraint merged = (PropertyRangeConstraint)mergedConstraint;

            Defaultable <ObjectValue> mergedMin = GetMinAsDefaultable().Merge(other.GetMinAsDefaultable(),
                                                                              mergeConflictAction);

            merged.Min         = new ObjectValueInfo();
            merged.Min.Enabled = mergedMin.IsCustom();
            merged.Min.Value   = mergedMin.Value;

            Defaultable <ObjectValue> mergedMax = GetMaxAsDefaultable().Merge(other.GetMaxAsDefaultable(),
                                                                              mergeConflictAction);

            merged.Max         = new ObjectValueInfo();
            merged.Max.Enabled = mergedMax.IsCustom();
            merged.Max.Value   = mergedMax.Value;
        }