Fix restore typo
[mono.git] / mcs / class / corlib / System.Security / HostProtectionException.cs
index c209ede23e6b3244e76d027aef2a24e4b1602bd5..8d828bc216e8d522ed755093880ce2cc2bf8af85 100644 (file)
@@ -4,7 +4,7 @@
 // Author:
 //     Sebastien Pouliot  <sebastien@ximian.com>
 //
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-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
@@ -26,9 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
 
-using System;
 using System.Runtime.InteropServices;
 using System.Runtime.Serialization;
 using System.Security.Permissions;
@@ -36,18 +34,34 @@ using System.Security.Permissions;
 namespace System.Security {
 
        [Serializable]
-       public class HostProtectionException : SystemException, _Exception {
+       [ComVisible (true)]
+       [MonoTODO ("Not supported in the runtime")]
+       public class HostProtectionException : SystemException {
 
-               private HostProtectionResource _inaccessible;
                private HostProtectionResource _protected;
                private HostProtectionResource _demanded;
 
-               public HostProtectionException (string message, HostProtectionResource inaccessibleResources, 
-                       HostProtectionResource protectedResources, HostProtectionResource demandedRessources)
+               public HostProtectionException ()
+               {
+               }
+
+               public HostProtectionException (string message)
                        : base (message)
                {
                }
 
+               public HostProtectionException (string message, Exception e)
+                       : base (message, e)
+               {
+               }
+
+               public HostProtectionException (string message, HostProtectionResource protectedResources, HostProtectionResource demandedResources)
+                       : base (message)
+               {
+                       this._protected = protectedResources;
+                       this._demanded = demandedResources;
+               }
+
                protected HostProtectionException (SerializationInfo info, StreamingContext context)
                {
                        GetObjectData (info, context);
@@ -55,17 +69,10 @@ namespace System.Security {
 
                public HostProtectionResource DemandedResources {
                        get { return _demanded; }
-                       set { _demanded = value; }
-               }
-
-               public HostProtectionResource InaccessibleResources {
-                       get { return _inaccessible; }
-                       set { _inaccessible = value; }
                }
 
                public HostProtectionResource ProtectedResources {
                        get { return _protected; }
-                       set { _protected = value; }
                }
 
                [MonoTODO]
@@ -82,5 +89,3 @@ namespace System.Security {
                }
        }
 }
-
-#endif