protected override void PreParse() { Debug.Assert(State != EFElementState.Parsed, "this object should not already be in the parsed state"); ClearEFObject(_entityTypes); _entityTypes = null; // once we have children that we can parse, set this to Derive and figure out the kind dynamically _kind = EntityTypeMappingKind.Derive; ClearEFObjectCollection(_fragments); ClearEFObject(_modificationFunctionMapping); _modificationFunctionMapping = null; base.PreParse(); }
internal override bool ParseSingleElement(ICollection<XName> unprocessedElements, XElement elem) { if (elem.Name.LocalName == MappingFragment.ElementName) { var frag = new MappingFragment(this, elem); _fragments.Add(frag); frag.Parse(unprocessedElements); } else if (elem.Name.LocalName == ModificationFunctionMapping.ElementName) { _modificationFunctionMapping = new ModificationFunctionMapping(this, elem); _modificationFunctionMapping.Parse(unprocessedElements); } else { return base.ParseSingleElement(unprocessedElements, elem); } return true; }
protected override void OnChildDeleted(EFContainer efContainer) { var child1 = efContainer as MappingFragment; if (child1 != null) { _fragments.Remove(child1); return; } if (efContainer == _modificationFunctionMapping) { _modificationFunctionMapping = null; return; } base.OnChildDeleted(efContainer); }