Merge pull request #5198 from BrzVlad/fix-binprot-stats
[mono.git] / mcs / class / corlib / System.Security.Permissions / CodeAccessSecurityAttribute.cs
index cd1ffb01f097fe9e6e1f614048a4186d283c10bf..05f56decf4a2b7b088d9bbf561f87581ba0852e4 100644 (file)
@@ -1,16 +1,11 @@
-//------------------------------------------------------------------------------
 // 
 // System.Security.Permissions.SecurityPermissionAttribute.cs 
 //
-// Copyright (C) 2001 Nick Drochak, All Rights Reserved
-// 
 // Author:         Nick Drochak, ndrochak@gol.com
 // Created:        2002-01-06 
 //
-//------------------------------------------------------------------------------
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2001 Nick Drochak, All Rights Reserved
+// Copyright (C) 2004-2006 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
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System;
-using System.Security.Permissions;
+using System.Runtime.InteropServices;
 
 namespace System.Security.Permissions {
 
-       [System.AttributeUsage(
-               System.AttributeTargets.Assembly 
-               | System.AttributeTargets.Class 
-               | System.AttributeTargets.Struct 
-               | System.AttributeTargets.Constructor 
-               | System.AttributeTargets.Method, 
+#if MOBILE && !MONOTOUCH
+       [Obsolete ("CAS support is not available with Silverlight applications.")]
+#endif
+       [ComVisible (true)]
+       [AttributeUsage(
+               AttributeTargets.Assembly 
+               | AttributeTargets.Class 
+               | AttributeTargets.Struct 
+               | AttributeTargets.Constructor 
+               | AttributeTargets.Method, 
                AllowMultiple=true, 
                Inherited=false)
        ]
        [Serializable]
        public abstract class CodeAccessSecurityAttribute : SecurityAttribute {
 
-               public CodeAccessSecurityAttribute (SecurityAction action) : base (action) {}
-
-       }  // public abstract class CodeAccessSecurityAttribute
-}  // namespace System.Security.Permissions
+               protected CodeAccessSecurityAttribute (SecurityAction action) 
+                       : base (action)
+               {
+               }
+       }
+}