Added OracleClientFactory implementation
authorKonstantin Triger <kostat@mono-cvs.ximian.com>
Tue, 20 Feb 2007 16:09:46 +0000 (16:09 -0000)
committerKonstantin Triger <kostat@mono-cvs.ximian.com>
Tue, 20 Feb 2007 16:09:46 +0000 (16:09 -0000)
svn path=/trunk/mcs/; revision=73181

mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleClientFactory.cs [new file with mode: 0644]
mcs/class/System.Data.OracleClient/System.Data.OracleClient20.csproj

diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleClientFactory.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleClientFactory.cs
new file mode 100644 (file)
index 0000000..cdca3f8
--- /dev/null
@@ -0,0 +1,84 @@
+//
+// System.Data.OracleClient.OracleClientFactory.cs
+//
+// Author:
+//   Sureshkumar T (tsureshkumar@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
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+namespace System.Data.OracleClient
+{
+       using System.Data;
+       using System.Data.Common;
+
+       public sealed class OracleClientFactory : DbProviderFactory
+       {
+               #region Fields
+               public static readonly OracleClientFactory Instance = new OracleClientFactory();
+               #endregion //Fields
+
+               #region Constructors
+
+               private OracleClientFactory () {
+
+               }
+
+               #endregion //Constructors
+
+               [MonoTODO]
+               public override bool CanCreateDataSourceEnumerator {
+                       get { throw new NotImplementedException (); }
+               }
+
+               #region public overrides
+               public override DbCommand CreateCommand () {
+                       return new OracleCommand ();
+               }
+
+               public override DbCommandBuilder CreateCommandBuilder () {
+                       return new OracleCommandBuilder ();
+               }
+
+               public override DbConnection CreateConnection () {
+                       return new OracleConnection ();
+               }
+
+               public override DbDataAdapter CreateDataAdapter () {
+                       return new OracleDataAdapter ();
+               }
+
+               [MonoTODO]
+               public override DbDataSourceEnumerator CreateDataSourceEnumerator () {
+                       throw new NotImplementedException ();
+               }
+
+               public override DbParameter CreateParameter () {
+                       return new OracleParameter ();
+               }
+
+               #endregion // public overrides
+       }
+}
+#endif // NET_2_0
index 405ef27730401c1abadc18ee322fcd0e55468aae..8eccfbaa8cccc08e62edf097d19067cc506f0e7a 100755 (executable)
     <Compile Include="System.Data.OracleClient.jvm\OracleParameterCollection.cs" />
     <Compile Include="System.Data.OracleClient.jvm\OracleTransaction.cs" />
     <Compile Include="System.Data.OracleClient.jvm\Regex.cs" />
+    <Compile Include="System.Data.OracleClient\OracleClientFactory.cs" />
     <Compile Include="System.Data.OracleClient\OracleDataAdapter.cs">
       <SubType>Component</SubType>
     </Compile>
   <ItemGroup>
     <Folder Include="Properties\" />
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>