// 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;
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) {
public static bool IsObjectThemeable (object obj)
{
-
return IsTypeThemeable (obj.GetType ());
}