public override void DeserializeFromXml(XmlReader reader) { OrmAssociationEnd associationEnd = new OrmAssociationEnd(); associationEnd.DeserializeFromXml(reader); this.AssignFrom(associationEnd); }
public bool EqualsTo(OrmAssociationEnd other) { return(this.multiplicity == other.multiplicity && this.OnOwnerRemove == other.OnOwnerRemove && this.OnTargetRemove == other.OnTargetRemove && this.UseAssociationAttribute == other.UseAssociationAttribute && this.pairTo.EqualsTo(other.pairTo)); }
private void AssignFrom(OrmAssociationEnd source) { this.Multiplicity = source.Multiplicity; this.OnOwnerRemove = source.OnOwnerRemove; this.OnTargetRemove = source.OnTargetRemove; this.PairTo = (Defaultable <string>)source.PairTo.Clone(); this.UseAssociationAttribute = source.UseAssociationAttribute; }
public OrmAssociationEnd ToOrmAssociationEnd() { OrmAssociationEnd associationEnd = new OrmAssociationEnd(); associationEnd.multiplicity = this.Multiplicity; associationEnd.OnOwnerRemove = this.OnOwnerRemove; associationEnd.OnTargetRemove = this.OnTargetRemove; associationEnd.UseAssociationAttribute = this.UseAssociationAttribute; associationEnd.PairTo = (Defaultable <string>) this.PairTo.Clone(); return(associationEnd); }
public override object CreateInstance(ITypeDescriptorContext context, IDictionary propertyValues) { ModelElement owner = context.Instance as ModelElement; OrmAssociationEnd currentObj = (OrmAssociationEnd)context.PropertyDescriptor.GetValue(context.Instance); MultiplicityKind otherMultiplicity = (MultiplicityKind)propertyValues["Multiplicity"]; AssociationOnRemoveAction otherOnOwnerRemove = (AssociationOnRemoveAction)propertyValues["OnOwnerRemove"]; AssociationOnRemoveAction otherOnTargetRemove = (AssociationOnRemoveAction)propertyValues["OnTargetRemove"]; Defaultable <string> otherPairTo = (Defaultable <string>)propertyValues["PairTo"]; bool useAssociationAttribute = (bool)propertyValues["UseAssociationAttribute"]; bool changedMultiplicity = currentObj.Multiplicity != otherMultiplicity; bool changedPairTo = !currentObj.PairTo.EqualsTo(otherPairTo); string endId = context.PropertyDescriptor.Name; OrmAssociationEnd result = new OrmAssociationEnd(owner, endId) { multiplicity = otherMultiplicity, OnOwnerRemove = otherOnOwnerRemove, OnTargetRemove = otherOnTargetRemove, pairTo = otherPairTo, UseAssociationAttribute = useAssociationAttribute }; // if (changedMultiplicity) // { // result.NotifyValueChangeToOwner("Multiplicity"); // } //if (changedPairTo) { result.NotifyValueChangeToOwner(string.Empty, endId); } return(result); }
public void AssignInternalsFrom(OrmAssociationEnd other) { this.owner = other.owner; this.endId = other.endId; }
public AssociationInfo(OrmAssociationEnd source) { AssignFrom(source); }