protected override void OnChildDeleted(EFContainer efContainer) { if (efContainer == _onDeteleAction) { _onDeteleAction = null; return; } base.OnChildDeleted(efContainer); }
protected override void InvokeInternal(CommandProcessorContext cpc) { // if the OnDeleteAction already exists then only change the action value _createdAction = _parentEnd.OnDeleteAction; if (_createdAction == null) { _createdAction = new OnDeleteAction(_parentEnd, null); _parentEnd.OnDeleteAction = _createdAction; } _createdAction.Action.Value = _action; XmlModelHelper.NormalizeAndResolve(_createdAction); }
protected override void PreParse() { Debug.Assert(State != EFElementState.Parsed, "this object should not already be in the parsed state"); ClearEFObject(_multiplicityAttr); _multiplicityAttr = null; ClearEFObject(_typeBinding); _typeBinding = null; ClearEFObject(_roleAttr); _roleAttr = null; ClearEFObject(_onDeteleAction); _onDeteleAction = null; base.PreParse(); }
internal override bool ParseSingleElement(ICollection <XName> unprocessedElements, XElement elem) { if (elem.Name.LocalName == OnDeleteAction.ElementName) { if (_onDeteleAction == null) { _onDeteleAction = new OnDeleteAction(this, elem); _onDeteleAction.Parse(unprocessedElements); } else { // multiple OnDelete elements var msg = String.Format(CultureInfo.CurrentCulture, Resources.DuplicatedElementMsg, elem.Name.LocalName); Artifact.AddParseErrorForObject(this, msg, ErrorCodes.DUPLICATED_ELEMENT_ENCOUNTERED); } } else { return(base.ParseSingleElement(unprocessedElements, elem)); } return(true); }