예제 #1
0
        protected override bool InternalEqualsTo(DefaultableMulti other)
        {
            OrmKeyAttribute otherAttr = (OrmKeyAttribute)other;

            return(this.Position.EqualsTo(otherAttr.Position) &&
                   this.Direction.EqualsTo(otherAttr.Direction));
        }
예제 #2
0
        protected override bool InternalEqualsTo(DefaultableMulti other)
        {
            PropertyConstraint otherContraint = (PropertyConstraint)other;

            return(this.Mode == otherContraint.Mode &&
                   Util.StringEqual(this.ErrorMessage, otherContraint.ErrorMessage, false));
        }
예제 #3
0
        protected override bool InternalEqualsTo(DefaultableMulti other)
        {
            ContractDescriptorBase otherDescriptor = (ContractDescriptorBase)other;

            return(this.Mode == otherDescriptor.Mode &&
                   Util.StringEqual(this.Name, otherDescriptor.Name, false));
        }
예제 #4
0
        protected override bool InternalEqualsTo(DefaultableMulti other)
        {
            OrmTypeDiscriminatorValueAttribute otherAttr = (OrmTypeDiscriminatorValueAttribute)other;

            return(this.Value.EqualsTo(otherAttr.Value) &&
                   this.Default && otherAttr.Default);
        }
예제 #5
0
        protected override bool InternalEqualsTo(DefaultableMulti other)
        {
            OrmHierarchyRootAttribute otherAttr = (OrmHierarchyRootAttribute)other;

            return(this.IncludeTypeId.EqualsTo(otherAttr.IncludeTypeId) &&
                   this.InheritanceSchema == otherAttr.InheritanceSchema &&
                   this.MappingName.EqualsTo(otherAttr.MappingName));
        }
예제 #6
0
        protected override bool InternalEqualsTo(DefaultableMulti other)
        {
            OrmKeyGeneratorAttribute otherAttr = (OrmKeyGeneratorAttribute)other;

            return(this.Kind == otherAttr.Kind &&
                   Util.StringEqual(this.Name, otherAttr.Name, false) &&
                   Util.StringEqual(this.Type, otherAttr.Type, false));
        }
예제 #7
0
 protected override void InternalAssignFrom(DefaultableMulti other)
 {
     if (other is ObjectValueInfo)
     {
         ObjectValueInfo info = (ObjectValueInfo)other;
         this.Enabled = info.Enabled;
         this.Value   = info.Value.Clone();
     }
 }
예제 #8
0
 protected override void InternalAssignFrom(DefaultableMulti other)
 {
     if (other is ContractDescriptorBase)
     {
         ContractDescriptorBase otherDescriptor = (ContractDescriptorBase)other;
         this.Name = otherDescriptor.Name;
         this.Mode = otherDescriptor.Mode;
     }
 }
예제 #9
0
 protected override void InternalAssignFrom(DefaultableMulti other)
 {
     if (other is OrmKeyAttribute)
     {
         OrmKeyAttribute attr = (OrmKeyAttribute)other;
         this.Enabled   = attr.Enabled;
         this.Position  = (Defaultable <int>)attr.Position.Clone();
         this.Direction = (Defaultable <KeyDirection>)attr.Direction.Clone();
     }
 }
예제 #10
0
 protected override void InternalAssignFrom(DefaultableMulti other)
 {
     if (other is PropertyConstraint)
     {
         PropertyConstraint otherContraint = (PropertyConstraint)other;
         this.Used         = otherContraint.Used;
         this.Mode         = otherContraint.Mode;
         this.ErrorMessage = otherContraint.ErrorMessage;
     }
 }
예제 #11
0
 protected override void InternalAssignFrom(DefaultableMulti other)
 {
     if (other is OrmTypeDiscriminatorValueAttribute)
     {
         OrmTypeDiscriminatorValueAttribute attr = (OrmTypeDiscriminatorValueAttribute)other;
         this.Enabled = attr.Enabled;
         this.Default = attr.Default;
         this.Value   = attr.Value.Clone();
     }
 }
예제 #12
0
        protected internal override bool SelectListItemByValue(ListItem item, object value)
        {
            DefaultableMulti defaultableMulti = value as DefaultableMulti;

            if (defaultableMulti != null)
            {
                return(defaultableMulti.ValueType.Equals(item.Value));
            }

            return(false);
        }
예제 #13
0
        protected override void InternalAssignFrom(DefaultableMulti other)
        {
            base.InternalAssignFrom(other);
            DataContractDescriptor otherDescriptor = other as DataContractDescriptor;

            if (otherDescriptor != null)
            {
                this.IsReference = otherDescriptor.IsReference;
                this.Namespace   = otherDescriptor.Namespace;
            }
        }
예제 #14
0
 protected override void InternalAssignFrom(DefaultableMulti other)
 {
     if (other is OrmKeyGeneratorAttribute)
     {
         OrmKeyGeneratorAttribute attr = (OrmKeyGeneratorAttribute)other;
         this.Enabled = attr.Enabled;
         this.Kind    = attr.Kind;
         this.Name    = attr.Name;
         this.Type    = attr.Type;
     }
 }
예제 #15
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();
            }
        }
예제 #16
0
        protected override void InternalAssignFrom(DefaultableMulti other)
        {
            base.InternalAssignFrom(other);
            PropertyRegexConstraint otherConstraint = other as PropertyRegexConstraint;

            if (otherConstraint != null)
            {
                this.Pattern = otherConstraint.Pattern;
                this.Options = otherConstraint.Options;
            }
        }
예제 #17
0
 protected override void InternalAssignFrom(DefaultableMulti other)
 {
     if (other is OrmHierarchyRootAttribute)
     {
         OrmHierarchyRootAttribute attr = (OrmHierarchyRootAttribute)other;
         this.Enabled           = attr.Enabled;
         this.IncludeTypeId     = (Defaultable <bool>)attr.IncludeTypeId.Clone();
         this.InheritanceSchema = attr.InheritanceSchema;
         this.MappingName       = (Defaultable <string>)attr.MappingName.Clone();
     }
 }
예제 #18
0
        protected override void InternalAssignFrom(DefaultableMulti other)
        {
            base.InternalAssignFrom(other);
            DataMemberDescriptor otherDescriptor = other as DataMemberDescriptor;

            if (otherDescriptor != null)
            {
                this.EmitDefaultValue = otherDescriptor.EmitDefaultValue;
                this.IsRequired       = otherDescriptor.IsRequired;
                this.Order            = otherDescriptor.Order;
            }
        }
예제 #19
0
        protected internal override object GetValueFromSelectedListItem(object lastSelectedValue, ListItem listItem)
        {
            DefaultableMulti lastValue = lastSelectedValue as DefaultableMulti;

            if (lastValue != null)
            {
                DefaultableMulti clone = (DefaultableMulti)lastValue.Clone();
                clone.ValueType = listItem == null ? clone.ValueTypeForNull : (string)listItem.Value;
                return(clone);
            }

            return(listItem.Value);
        }
예제 #20
0
        protected override bool InternalEqualsTo(DefaultableMulti other)
        {
            bool equals = base.InternalEqualsTo(other);
            PropertyRegexConstraint otherConstraint = other as PropertyRegexConstraint;

            if (equals && otherConstraint != null)
            {
                equals = Util.StringEqual(this.Pattern, otherConstraint.Pattern, false) &&
                         this.Options == otherConstraint.Options;
            }

            return(equals);
        }
예제 #21
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);
        }
예제 #22
0
        protected override bool InternalEqualsTo(DefaultableMulti other)
        {
            bool equalsTo = base.InternalEqualsTo(other);
            DataContractDescriptor otherDescriptor = other as DataContractDescriptor;

            equalsTo &= otherDescriptor != null;
            if (equalsTo)
            {
                return(this.IsReference == otherDescriptor.IsReference &&
                       Util.StringEqual(this.Namespace, otherDescriptor.Namespace, true));
            }

            return(equalsTo);
        }
예제 #23
0
        protected override bool InternalEqualsTo(DefaultableMulti other)
        {
            bool equalsTo = base.InternalEqualsTo(other);
            DataMemberDescriptor otherDescriptor = other as DataMemberDescriptor;

            equalsTo &= otherDescriptor != null;
            if (equalsTo)
            {
                return(this.EmitDefaultValue.EqualsTo(otherDescriptor.EmitDefaultValue) &&
                       this.IsRequired.EqualsTo(otherDescriptor.IsRequired) &&
                       this.Order.EqualsTo(otherDescriptor.Order));
            }

            return(equalsTo);
        }
예제 #24
0
        protected override bool InternalEqualsTo(DefaultableMulti other)
        {
            ObjectValueInfo otherInfo = (ObjectValueInfo)other;

            return(this.Value.EqualsTo(otherInfo.Value));
        }