public IOrmAttribute MergeChanges(IOrmAttribute otherAttribute, MergeConflictAction mergeConflictAction) { OrmHierarchyRootAttribute other = (OrmHierarchyRootAttribute)otherAttribute; OrmHierarchyRootAttribute mergedResult = new OrmHierarchyRootAttribute(); bool enabled = this.Enabled; //if (!other.Enabled && mergeConflictAction == MergeConflictAction.TakeOther) if (other.Enabled && !enabled && mergeConflictAction == MergeConflictAction.TakeOther) { enabled = other.Enabled; } mergedResult.Enabled = enabled; var mergedInheritanceSchema = this.GetDefInheritanceSchema().Merge(other.GetDefInheritanceSchema(), mergeConflictAction); mergedResult.InheritanceSchema = mergedInheritanceSchema.Value; mergedResult.IncludeTypeId = this.IncludeTypeId.Merge(other.IncludeTypeId, mergeConflictAction); mergedResult.MappingName = this.MappingName.Merge(other.MappingName, mergeConflictAction); return(mergedResult); }
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)); }
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(); } }