Merge pull request #4540 from kumpera/android-changes-part1
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls / CompositeControl.cs
index a46a79ad9cbfd6626dfdc960cb77187f248655f4..beeaf5365653a4b2301a934cd79a67f4f357e7ea 100644 (file)
@@ -4,7 +4,7 @@
 // Authors: Ben Maurer <bmaurer@novell.com>
 //          Chris Toshok <toshok@novell.com>
 //
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 //
 
 using System.ComponentModel;
+using System.Security.Permissions;
 
-namespace System.Web.UI.WebControls {
-
-#if NET_2_0
+namespace System.Web.UI.WebControls
+{
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [Designer ("System.Web.UI.Design.WebControls.CompositeControlDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
-       public abstract class CompositeControl : WebControl, INamingContainer, ICompositeControlDesignerAccessor {
-
+       public abstract class CompositeControl : WebControl, INamingContainer, ICompositeControlDesignerAccessor
+       {
+               public override bool SupportsDisabledAttribute {
+                       get { return RenderingCompatibilityLessThan40; }
+               }
                protected CompositeControl ()
                {
                }
@@ -46,16 +53,21 @@ namespace System.Web.UI.WebControls {
                        base.DataBind();
                }
 
-               protected internal override void Render (HtmlTextWriter w)
+               protected internal override void Render (HtmlTextWriter writer)
                {
                        /* make sure all the child controls have been created */
                        EnsureChildControls ();
                        /* and then... */
-                       base.Render (w);
+                       base.Render (writer);
                }
 
-               [MonoTODO("not sure exactly what this one does..")]
                void ICompositeControlDesignerAccessor.RecreateChildControls ()
+               {
+                       RecreateChildControls ();
+               }
+
+               [MonoTODO("not sure exactly what this one does..")]
+               protected virtual void RecreateChildControls ()
                {
                        /* for now just call CreateChildControls to force
                         * the recreation of our children. */
@@ -71,6 +83,5 @@ namespace System.Web.UI.WebControls {
                        }
                }
        }
-#endif
-
 }
+