Esempio n. 1
0
 internal override bool ParseSingleElement(ICollection <XName> unprocessedElements, XElement elem)
 {
     if (elem.Name.LocalName == ResultMapping.ElementName)
     {
         if (_resultMapping != null)
         {
             // multiple ResultMapping elements
             var msg = String.Format(CultureInfo.CurrentCulture, Resources.DuplicatedElementMsg, elem.Name.LocalName);
             Artifact.AddParseErrorForObject(this, msg, ErrorCodes.DUPLICATED_ELEMENT_ENCOUNTERED);
         }
         else
         {
             _resultMapping = new ResultMapping(this, elem);
             _resultMapping.Parse(unprocessedElements);
         }
     }
     else
     {
         base.ParseSingleElement(unprocessedElements, elem);
     }
     return(true);
 }
 internal FunctionImportComplexTypeMapping(ResultMapping parent, XElement element)
     : base(parent, element)
 {
 }
 internal FunctionImportEntityTypeMapping(ResultMapping parent, XElement element)
     : base(parent, element)
 {
 }
 internal FunctionImportEntityTypeMapping(ResultMapping parent, XElement element)
     : base(parent, element)
 {
 }
 internal FunctionImportComplexTypeMapping(ResultMapping parent, XElement element)
     : base(parent, element)
 {
 }
 internal override bool ParseSingleElement(ICollection<XName> unprocessedElements, XElement elem)
 {
     if (elem.Name.LocalName == ResultMapping.ElementName)
     {
         if (_resultMapping != null)
         {
             // multiple ResultMapping elements
             var msg = String.Format(CultureInfo.CurrentCulture, Resources.DuplicatedElementMsg, elem.Name.LocalName);
             Artifact.AddParseErrorForObject(this, msg, ErrorCodes.DUPLICATED_ELEMENT_ENCOUNTERED);
         }
         else
         {
             _resultMapping = new ResultMapping(this, elem);
             _resultMapping.Parse(unprocessedElements);
         }
     }
     else
     {
         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(_functionImportName);
            _functionImportName = null;

            ClearEFObject(_functionName);
            _functionName = null;

            ClearEFObject(_resultMapping);
            _resultMapping = null;

            base.PreParse();
        }
 protected override void OnChildDeleted(EFContainer efContainer)
 {
     var rm = efContainer as ResultMapping;
     if (rm != null)
     {
         Debug.Assert(_resultMapping == rm, "Unknown ResultMapping in OnChildDeleted");
         ClearEFObject(_resultMapping);
         _resultMapping = null;
     }
     else
     {
         base.OnChildDeleted(efContainer);
     }
 }