updating to the latest module.
[mono.git] / mcs / class / corlib / System.Security.Principal / WindowsImpersonationContext.cs
index 11f0be64d04e7c26d022997b5aa3e662b3076988..c2306e6d58d5e685654b17fe89c3e0fcc332a403 100644 (file)
@@ -6,7 +6,11 @@
 //     Sebastien Pouliot  (sebastien@ximian.com)
 //
 // (C) 2002 Ximian, Inc (http://www.ximian.com)
-// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// (C) 2004 Novell (http://www.novell.com)
+//
+
+//
+// Copyright (C) 2004 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.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
 using System.Security;
 
 namespace System.Security.Principal {
 
-#if NET_2_0
-       [ComVisible (true)]
-       public class WindowsImpersonationContext : IDisposable {
-#else
        public class WindowsImpersonationContext {
-#endif
 
                private IntPtr _token;
                private bool undo;
@@ -53,30 +52,14 @@ namespace System.Security.Principal {
                        }
                        undo = false;
                }
-#if NET_2_0
-               [ComVisible (false)]
-               public void Dispose ()
-               {
-                       if (!undo) {
-                               Undo ();
-                       }
-               }
-               
-               [ComVisible (false)]
-               protected virtual void Dispose (bool disposing)
-               {
-                       if (!undo) {
-                               Undo ();
-                       }
-               }
-#else
+
                ~WindowsImpersonationContext ()
                {
                        if (!undo) {
                                Undo ();
                        }
                }
-#endif
+
                public void Undo ()
                {
                        if (!RevertToSelf ()) {