* OciGlue.cs: Set eol-style to native.
[mono.git] / mcs / class / System.Data.OracleClient / System.Data.OracleClient / OraclePermissionAttribute.cs
index 8d8ca4c0d1411f33ac3cc2c16131ff322aceaf0b..e36f6d650cd27ddfd839cf2b2b6a42c99c603bbb 100644 (file)
@@ -7,37 +7,38 @@
 // Assembly: System.Data.OracleClient.dll
 // Namespace: System.Data.OracleClient
 //
-// Author: Tim Coleman <tim@timcoleman.com>
+// Authors:
+//     Tim Coleman <tim@timcoleman.com>
+//     Sebastien Pouliot  <sebastien@ximian.com>
 //
 // Copyright (C) Tim Coleman, 2003
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
 //
 // Licensed under the MIT/X11 License.
 //
 
-using System;
+using System.Data.Common;
 using System.Security;
 using System.Security.Permissions;
 
 namespace System.Data.OracleClient {
-       [AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Constructor)]
+
        [Serializable]
-       public sealed class OraclePermissionAttribute : CodeAccessSecurityAttribute
-       {
+       [AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class | 
+                        AttributeTargets.Struct | AttributeTargets.Constructor | 
+                        AttributeTargets.Method, AllowMultiple=true,
+                        Inherited=false)]
+#if NET_2_0
+       public sealed class OraclePermissionAttribute : DBDataPermissionAttribute {
+#else
+       public sealed class OraclePermissionAttribute : CodeAccessSecurityAttribute {
+
                #region Fields
 
                bool allowBlankPassword;
 
                #endregion // Fields
 
-               #region Constructors
-
-               public OraclePermissionAttribute (SecurityAction action) 
-                       : base (action)
-               {
-               }
-
-               #endregion // Constructors
-
                #region Properties
 
                public bool AllowBlankPassword {
@@ -46,12 +47,22 @@ namespace System.Data.OracleClient {
                }
 
                #endregion // Properties
+#endif
+
+               #region Constructors
+
+               public OraclePermissionAttribute (SecurityAction action) 
+                       : base (action)
+               {
+               }
+
+               #endregion // Constructors
 
                #region Methods
 
                public override IPermission CreatePermission ()
                {
-                       throw new NotImplementedException ();
+                       return new OraclePermission (this);
                }
 
                #endregion // Methods