src/Misc/EFTools/XmlCore/Model/EFElement.cs
/// <summary>
///     NOTE: this is called from the EFObject c'tor so only that class is fully instantiated!
/// </summary>
/// <param name="parent"></param>
/// <returns></returns>
this is called from the EFObject c'tor so only that class is fully instantiated!
this is called from the EFObject c ' tor so only that class is fully instantiated!
protected override void AddToXlinq()
        {
            State = EFElementState.ParseAttempted;
            Debug.Assert(XObject == null, "Object already serialized");
            Debug.Assert(!string.IsNullOrEmpty(EFTypeName), "Can't create XElement without the name");
            Debug.Assert(Parent != null && Parent.XContainer != null, "Can't serialize this if the Parent or it's XContainer is missing");
            var ns = Artifact.ModelManager.GetRootNamespace(Parent);
            var element = new XElement(ns == null ? EFTypeName : ns + EFTypeName);
            SetXObject(element);
            ModelItemAnnotation.SetModelItem(element, this);
            AddXElementToParent(element);
            State = EFElementState.Parsed;
        }
protected override void AddToXlinq ( ) { State = EFElementState . ParseAttempted ; Debug . Assert ( XObject == null , " " ) ; Debug . Assert ( ! string . IsNullOrEmpty ( EFTypeName ) , " " ) ; Debug . Assert ( Parent != null && Parent . XContainer != null , " " ) ; var ns = Artifact . ModelManager . GetRootNamespace ( Parent ) ; var element = new XElement ( ns == null ? EFTypeName : ns + EFTypeName ) ; SetXObject ( element ) ; ModelItemAnnotation . SetModelItem ( element , this ) ; AddXElementToParent ( element ) ; State = EFElementState . Parsed ; }
NOTE: this is called from the EFObject c'tor so only that class is fully instantiated!
NOTE : this is called from the EFObject c ' tor so only that class is fully instantiated!
None
parent
None