Mark tests as not working under TARGET_JVM
[mono.git] / mcs / class / System.Data / System.Data.Common / DbDataPermission.cs
index e2d445272806260d904012ce0810343596ad35b5..9d2139c982b98c59e140ec2977071112b3bf79eb 100644 (file)
@@ -90,18 +90,6 @@ namespace System.Data.Common {
                        }
                }
 
-#if NET_2_0
-               [MonoTODO]
-               protected DBDataPermission (DbConnectionOptions connectionOptions)
-                       : this (PermissionState.None)
-               {
-                       // ignore null (i.e. no ArgumentNullException)
-                       if (connectionOptions != null) {
-                               throw new NotImplementedException ();
-                       }
-               }
-#endif
-
                protected DBDataPermission (PermissionState state) 
                {
                        this.state = PermissionHelper.CheckPermissionState (state, true);
@@ -110,8 +98,11 @@ namespace System.Data.Common {
 
 #if NET_2_0
                [Obsolete ("use DBDataPermission (PermissionState.None)", true)]
+               protected 
+#else
+               public
 #endif
-               public DBDataPermission (PermissionState state, bool allowBlankPassword)
+               DBDataPermission (PermissionState state, bool allowBlankPassword)
                        : this (state)
                {
                        this.allowBlankPassword = allowBlankPassword;
@@ -130,26 +121,11 @@ namespace System.Data.Common {
 
                #region Methods
 
-#if NET_2_0
-               public virtual void Add (string connectionString, string restrictions, KeyRestrictionBehavior behavior)
-               {
-                       state = PermissionState.None;
-                       AddConnectionString (connectionString, restrictions, behavior, null, false);
-               }
-
-               [MonoTODO ("synonyms and useFirstKeyValue aren't supported")]
-               protected virtual void AddConnectionString (string connectionString, string restrictions, 
-                       KeyRestrictionBehavior behavior, Hashtable synonyms, bool useFirstKeyValue)
-               {
-                       _connections [connectionString] = new object [2] { restrictions, behavior };
-               }
-#elif NET_1_1
                public virtual void Add (string connectionString, string restrictions, KeyRestrictionBehavior behavior)
                {
                        state = PermissionState.None;
                        _connections [connectionString] = new object [2] { restrictions, behavior };
                }
-#endif
 
                protected void Clear ()
                {
@@ -208,9 +184,9 @@ namespace System.Data.Common {
                        }
                }
 
-               [MonoTODO ("restrictions not completely implemented - nor documented")]
                public override IPermission Intersect (IPermission target) 
                {
+                       // FIXME: restrictions not completely implemented - nor documented
                        DBDataPermission dbdp = Cast (target);
                        if (dbdp == null)
                                return null;
@@ -237,9 +213,9 @@ namespace System.Data.Common {
                        return (p._connections.Count > 0) ? p : null;
                }
 
-               [MonoTODO ("restrictions not completely implemented - nor documented")]
                public override bool IsSubsetOf (IPermission target) 
                {
+                       // FIXME: restrictions not completely implemented - nor documented
                        DBDataPermission dbdp = Cast (target);
                        if (dbdp == null)
                                return IsEmpty ();
@@ -269,22 +245,6 @@ namespace System.Data.Common {
                        return (state == PermissionState.Unrestricted);
                }
 
-#if NET_2_0
-               [MonoTODO ("DO NOT IMPLEMENT - will be removed")]
-               [Obsolete ("DO NOT IMPLEMENT - will be removed")]
-               protected void SetConnectionString (DbConnectionOptions constr)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               [MonoTODO ("DO NOT IMPLEMENT - will be removed")]
-               [Obsolete ("DO NOT IMPLEMENT - will be removed")]
-               public virtual void SetRestriction (string connectionString, string restrictions, KeyRestrictionBehavior behavior)
-               {
-                       throw new NotImplementedException ();
-               }
-#endif
-
                public override SecurityElement ToXml ()
                {
                        SecurityElement se = PermissionHelper.Element (this.GetType (), version);
@@ -307,14 +267,14 @@ namespace System.Data.Common {
                        return se;
                }
 
-               [MonoTODO ("restrictions not completely implemented - nor documented")]
                public override IPermission Union (IPermission target) 
                {
+                       // FIXME: restrictions not completely implemented - nor documented
                        DBDataPermission dbdp = Cast (target);
                        if (dbdp == null)
                                return Copy ();
                        if (IsEmpty () && dbdp.IsEmpty ())
-                               return null;
+                               return Copy ();
 
                        DBDataPermission p = CreateInstance ();
                        if (IsUnrestricted () || dbdp.IsUnrestricted ()) {