[bcl] Remove NET_4_0 defines from class libs.
[mono.git] / mcs / class / corlib / System.Threading / CompressedStack.cs
index 464ef12bff84f1fa7dc31fee36668b40c92e917e..e440ba068b70b52d7a9cc3dcca3d9ea42cf4c733 100644 (file)
@@ -37,12 +37,8 @@ using System.Security.Permissions;
 
 namespace System.Threading {
 
-#if NET_2_0
        [Serializable]
        public sealed class CompressedStack : ISerializable {
-#else
-       public class CompressedStack {
-#endif
                private ArrayList _list;
 
                internal CompressedStack (int length)
@@ -57,23 +53,13 @@ namespace System.Threading {
                                _list = (ArrayList) cs._list.Clone ();
                }
 
-#if NET_2_0
                [ComVisibleAttribute (false)]
-               public
-#else
-               internal
-#endif
-               CompressedStack CreateCopy ()
+               public CompressedStack CreateCopy ()
                {
                        return new CompressedStack (this);
                }
 
-#if NET_2_0
-               public
-#else
-               internal
-#endif
-               static CompressedStack Capture ()
+               public static CompressedStack Capture ()
                {
                        CompressedStack cs = new CompressedStack (0);
                        cs._list = SecurityFrame.GetStack (1);
@@ -90,8 +76,7 @@ namespace System.Threading {
                // NOTE: This method doesn't show in the class library status page because
                // it cannot be "found" with the StrongNameIdentityPermission for ECMA key.
                // But it's there!
-               [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
-               [StrongNameIdentityPermission (SecurityAction.LinkDemand, PublicKey="00000000000000000400000000000000")]
+               [SecurityCritical]
                static public CompressedStack GetCompressedStack ()
                {
                        // Note: CompressedStack.GetCompressedStack doesn't return null
@@ -110,16 +95,15 @@ namespace System.Threading {
                        return cs;
                }
 
-#if NET_2_0
                [MonoTODO ("incomplete")]
-               [ReflectionPermission (SecurityAction.Demand, MemberAccess = true)]
+               [SecurityCritical]
                public void GetObjectData (SerializationInfo info, StreamingContext context)
                {
                        if (info == null)
                                throw new ArgumentNullException ("info");
                }
 
-               [SecurityPermission (SecurityAction.LinkDemand, Infrastructure = true)]
+               [SecurityCritical]
                static public void Run (CompressedStack compressedStack, ContextCallback callback, object state)
                {
                        if (compressedStack == null)
@@ -137,9 +121,8 @@ namespace System.Threading {
                                        t.SetCompressedStack (original);
                        }
                }
-#endif
-               // internal stuff
 
+               // internal stuff
                internal bool Equals (CompressedStack cs)
                {
                        if (IsEmpty ())