Esempio n. 1
0
 internal override bool ParseSingleElement(ICollection <XName> unprocessedElements, XElement elem)
 {
     if (elem.Name.LocalName == EndProperty.ElementName)
     {
         var ep = new EndProperty(this, elem);
         ep.Parse(unprocessedElements);
         _endProperties.Add(ep);
     }
     else if (elem.Name.LocalName == Condition.ElementName)
     {
         var c = new Condition(this, elem);
         c.Parse(unprocessedElements);
         _conditions.Add(c);
     }
     else if (elem.Name.LocalName == QueryView.ElementName)
     {
         Debug.Assert(
             _queryView == null, "There could only be 1 instance of QueryView element inside AssociationSetMapping element.");
         _queryView = new QueryView(this, elem);
         _queryView.Parse(unprocessedElements);
     }
     else
     {
         return(base.ParseSingleElement(unprocessedElements, elem));
     }
     return(true);
 }
Esempio n. 2
0
        protected override void PreParse()
        {
            Debug.Assert(State != EFElementState.Parsed, "this object should not already be in the parsed state");

            ClearEFObject(_name);
            _name = null;
            ClearEFObject(_typeName);
            _typeName = null;
            ClearEFObject(_tableName);
            _tableName = null;
            ClearEFObject(_queryView);
            _queryView = null;

            ClearEFObjectCollection(_endProperties);
            ClearEFObjectCollection(_conditions);

            base.PreParse();
        }
Esempio n. 3
0
 internal override bool ParseSingleElement(ICollection <XName> unprocessedElements, XElement elem)
 {
     if (elem.Name.LocalName == EntityTypeMapping.ElementName)
     {
         var etm = new EntityTypeMapping(this, elem);
         _entityTypeMappings.Add(etm);
         etm.Parse(unprocessedElements);
     }
     else if (elem.Name.LocalName == QueryView.ElementName)
     {
         var qv = new QueryView(this, elem);
         qv.Parse(unprocessedElements);
         _queryViews.Add(qv);
     }
     else
     {
         return(base.ParseSingleElement(unprocessedElements, elem));
     }
     return(true);
 }
 internal override bool ParseSingleElement(ICollection<XName> unprocessedElements, XElement elem)
 {
     if (elem.Name.LocalName == EndProperty.ElementName)
     {
         var ep = new EndProperty(this, elem);
         ep.Parse(unprocessedElements);
         _endProperties.Add(ep);
     }
     else if (elem.Name.LocalName == Condition.ElementName)
     {
         var c = new Condition(this, elem);
         c.Parse(unprocessedElements);
         _conditions.Add(c);
     }
     else if (elem.Name.LocalName == QueryView.ElementName)
     {
         Debug.Assert(
             _queryView == null, "There could only be 1 instance of QueryView element inside AssociationSetMapping element.");
         _queryView = new QueryView(this, elem);
         _queryView.Parse(unprocessedElements);
     }
     else
     {
         return base.ParseSingleElement(unprocessedElements, elem);
     }
     return true;
 }
        protected override void PreParse()
        {
            Debug.Assert(State != EFElementState.Parsed, "this object should not already be in the parsed state");

            ClearEFObject(_name);
            _name = null;
            ClearEFObject(_typeName);
            _typeName = null;
            ClearEFObject(_tableName);
            _tableName = null;
            ClearEFObject(_queryView);
            _queryView = null;

            ClearEFObjectCollection(_endProperties);
            ClearEFObjectCollection(_conditions);

            base.PreParse();
        }
 internal override bool ParseSingleElement(ICollection<XName> unprocessedElements, XElement elem)
 {
     if (elem.Name.LocalName == EntityTypeMapping.ElementName)
     {
         var etm = new EntityTypeMapping(this, elem);
         _entityTypeMappings.Add(etm);
         etm.Parse(unprocessedElements);
     }
     else if (elem.Name.LocalName == QueryView.ElementName)
     {
         var qv = new QueryView(this, elem);
         qv.Parse(unprocessedElements);
         _queryViews.Add(qv);
     }
     else
     {
         return base.ParseSingleElement(unprocessedElements, elem);
     }
     return true;
 }