2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / class / corlib / System.Security.Permissions / SecurityAttribute.cs
index 01a8a0ebf8c01cde8d83ec4f1d0f34ba4028dfb3..da39130e4c59499cf644909d245060def08e39d8 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System;
-using System.Security;
-
 namespace System.Security.Permissions {
-       [System.AttributeUsage(
-               System.AttributeTargets.Assembly 
-               | System.AttributeTargets.Class 
-               | System.AttributeTargets.Struct 
-               | System.AttributeTargets.Constructor 
-               | System.AttributeTargets.Method, 
+
+       [AttributeUsage(
+               AttributeTargets.Assembly 
+               | AttributeTargets.Class 
+               | AttributeTargets.Struct 
+               | AttributeTargets.Constructor 
+               | AttributeTargets.Method, 
                AllowMultiple=true, 
                Inherited=false)
        ]
-
        [Serializable]
        public abstract class SecurityAttribute : Attribute {
 
@@ -60,24 +57,13 @@ namespace System.Security.Permissions {
                public abstract IPermission CreatePermission ();
 
                public bool Unrestricted {
-                       get {
-                               return m_Unrestricted;
-                       }
-                       set {
-                               m_Unrestricted = value;
-                       }
+                       get { return m_Unrestricted; }
+                       set { m_Unrestricted = value; }
                }
 
                public SecurityAction Action {
-                       get {
-                               return m_Action;
-                       }
-                       set {
-                               if (!SecurityAction.IsDefined(typeof(SecurityAction), value)) {
-                                       throw new System.ArgumentException();
-                               }
-                               m_Action = value;
-                       }
+                       get { return m_Action; }
+                       set { m_Action = value; }
                }
-       } // public abstract class SecurityAttribute
-}  // namespace System.Security.Permissions
+       }
+}