2009-09-22 Sebastien Pouliot <sebastien@ximian.com>
[mono.git] / mcs / class / corlib / System.Security.Permissions / PermissionSetAttribute.cs
index 9022f9e4ce41765f6b47656301be00f2025368f5..74ceebd9477f8d8c220abd0fc950651315584248 100644 (file)
@@ -96,6 +96,7 @@ namespace System.Security.Permissions {
 
                private PermissionSet CreateFromXml (string xml) 
                {
+#if !NET_2_1
                        SecurityParser sp = new SecurityParser ();
                        try {
                                sp.LoadXml (xml);
@@ -123,12 +124,14 @@ namespace System.Security.Permissions {
                                ps.FromXml (se);
                                return ps;
                        }
+#endif
                        return null;
                }
 
                public PermissionSet CreatePermissionSet ()
                {
                        PermissionSet pset = null;
+#if !NET_2_1
                        if (this.Unrestricted)
                                pset = new PermissionSet (PermissionState.Unrestricted);
                        else {
@@ -155,6 +158,7 @@ namespace System.Security.Permissions {
                                }
 #endif
                        }
+#endif
                        return pset;
                }
        }