New test.
[mono.git] / mcs / class / System.Web / System.Web.UI / ThemeableAttribute.cs
index 32c30443e84a3d3b0fcf62a0043fd0013efa527f..be8c75c061ccd0b24d007a0cbebc850c7728e85f 100644 (file)
@@ -5,8 +5,7 @@
 //     Sanjay Gupta (gsanjay@novell.com)
 //
 // (C) 2004 Novell, Inc. (http://www.novell.com)
-//
-
+// Copyright (C) 2005 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
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
+
 #if NET_2_0
-using System;
+
 using System.ComponentModel;
+using System.Security.Permissions;
 
 namespace System.Web.UI {
        
+       // CAS - no InheritanceDemand here as the class is sealed
+       [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [AttributeUsage (AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = false, Inherited = true)]          
-       public sealed class ThemeableAttribute : Attribute, IDisposable 
-       {
-               private bool themeable;
-               private bool dispose;
+       public sealed class ThemeableAttribute : Attribute {
 
+               private bool themeable;
                public ThemeableAttribute (bool themeable) 
                {
                        this.themeable = themeable;
@@ -54,20 +56,6 @@ namespace System.Web.UI {
                        get { return themeable; } 
                }
 
-               public void Dispose ()
-               {
-                       Dispose (true);
-                       GC.SuppressFinalize (this);
-               }
-               
-               private void Dispose (bool disposing)
-               {
-                       if (!this.dispose){
-                               //Do nothing
-                               this.dispose = true;
-                       }
-               }
-
                public override bool Equals (object obj)
                {
                        if (obj != null && obj is ThemeableAttribute) {
@@ -89,7 +77,6 @@ namespace System.Web.UI {
 
                public static bool IsObjectThemeable (object obj)
                {
-                       
                        return IsTypeThemeable (obj.GetType ());
                }