示例#1
0
        protected override void PreParse()
        {
            Debug.Assert(State != EFElementState.Parsed, "this object should not already be in the parsed state");

            ClearEFObjectCollection(_properties);
            ClearEFObject(_key);
            _key = null;
            base.PreParse();
        }
示例#2
0
 internal override bool ParseSingleElement(ICollection<XName> unprocessedElements, XElement elem)
 {
     if (elem.Name.LocalName == Key.ElementName)
     {
         if (_key != null)
         {
             // multiple key elements
             Artifact.AddParseErrorForObject(this, Resources.TOO_MANY_KEY_ELEMENTS, ErrorCodes.TOO_MANY_KEY_ELEMENTS);
         }
         else
         {
             _key = new Key(this, elem);
             _key.Parse(unprocessedElements);
         }
     }
     else
     {
         return base.ParseSingleElement(unprocessedElements, elem);
     }
     return true;
 }
示例#3
0
        protected override void OnChildDeleted(EFContainer efContainer)
        {
            var child1 = efContainer as Property;
            if (child1 != null)
            {
                _properties.Remove(child1);
                return;
            }

            var child3 = efContainer as Key;
            if (child3 != null)
            {
                _key = null;
                return;
            }

            base.OnChildDeleted(efContainer);
        }