Removal of NET_1_1 defines and some NET_2_0; Both defines are true these days in...
[mono.git] / mcs / class / System.XML / System.Xml.Schema / XmlSchemaSimpleContent.cs
index c3a9a27ea957838fb139c811ec01b549ba5f5cd8..b3c1502734407065d3da84f737a85915cdcbbe5f 100644 (file)
@@ -51,6 +51,13 @@ namespace System.Xml.Schema
                        set{ content = value; }
                }
 
+               internal override void SetParent (XmlSchemaObject parent)
+               {
+                       base.SetParent (parent);
+                       if (Content != null)
+                               Content.SetParent (this);
+               }
+
                ///<remarks>
                /// 1. Content must be present and one of restriction or extention
                ///</remarks>
@@ -66,9 +73,6 @@ namespace System.Xml.Schema
                        }
                        else
                        {
-#if NET_2_0
-                               Content.Parent = this;
-#endif
                                if(Content is XmlSchemaSimpleContentRestriction)
                                {
                                        XmlSchemaSimpleContentRestriction xscr = (XmlSchemaSimpleContentRestriction) Content;