From: Richard B. <rb...@us...> - 2005-04-11 00:32:35
|
Update of /cvsroot/jcframework/dotnet/Providers/AF_Informix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv815/Providers/AF_Informix Modified Files: AF_Informix.vbproj AssemblyInfo.vb CInformixConnection.vb CInformixDatabase.vb Log Message: Name changes to bring class library into line with Microsoft naming standards. FxCop directory added Nunit tests moved into main repository Index: AssemblyInfo.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/Providers/AF_Informix/AssemblyInfo.vb,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- AssemblyInfo.vb 6 Apr 2005 06:34:21 -0000 1.2 +++ AssemblyInfo.vb 11 Apr 2005 00:31:45 -0000 1.3 @@ -29,5 +29,5 @@ ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: -<Assembly: AssemblyVersion("2.1.0.0")> -<Assembly: AssemblyFileVersion("2.1.0.0")> +<Assembly: AssemblyVersion("2.2.0.0")> +<Assembly: AssemblyFileVersion("2.2.0.0")> Index: CInformixDatabase.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/Providers/AF_Informix/CInformixDatabase.vb,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- CInformixDatabase.vb 1 Apr 2005 00:04:32 -0000 1.3 +++ CInformixDatabase.vb 11 Apr 2005 00:31:45 -0000 1.4 @@ -1,7 +1,7 @@ Option Strict Off Option Explicit On Imports IBM.Data.Informix -Imports AToMSFramework +Imports AtomsFramework '''----------------------------------------------------------------------------- ''' Project : AToMSFramework @@ -9,7 +9,7 @@ ''' '''----------------------------------------------------------------------------- ''' <summary> -''' Implementation of CRelationalDatabase for IBM Informix Servers. +''' Implementation of RelationalDatabase for IBM Informix Servers. ''' </summary> ''' <remarks>This class contains the specific functionality required for the ''' framework to interact with Informix databases.</remarks> @@ -18,7 +18,7 @@ ''' </history> '''----------------------------------------------------------------------------- Public Class CInformixDatabase - Inherits CRelationalDatabase + Inherits RelationalDatabase Private m_name As String Private m_user As String @@ -32,7 +32,7 @@ ''' Establishes a new database connection. ''' </summary> ''' <returns>A CInformixConnection containing the newly established connection.</returns> - ''' <remarks>The CInformixConnection class implements the _CConnection interface which + ''' <remarks>The CInformixConnection class implements the IConnection interface which ''' is required by this method. ''' <para>If the connection cannot be established an exception will be thrown.</para> ''' <para>The connection is established using normal SQL server authentication (ie @@ -41,7 +41,7 @@ ''' [rbanks] 11/12/2003 Created ''' </history> '''----------------------------------------------------------------------------- - Public Overrides Function getNewConnection() As _CConnection + Public Overrides Function getNewConnection() As IConnection Dim conn As New CInformixConnection conn.Connection = New IfxConnection conn.ManageTransactions = True @@ -49,9 +49,9 @@ If m_user Is Nothing OrElse m_user.Length = 0 Then m_user = "" m_password = "" - Dim pbroker As CPersistenceBroker + Dim pbroker As PersistenceBroker pbroker = getPersistenceBrokerInstance() - pbroker.GetLoginDetails(Me, m_user, m_password) + pbroker.GetLogOnDetails(Me, m_user, m_password) End If If m_service = String.Empty Then m_service = "8080" conn.Connection.ConnectionString = _ @@ -192,9 +192,9 @@ Dim row As System.Data.DataRow Dim p As IfxParameter Dim initvals() As Object = {1} - Dim x As OIDException + Dim x As ObjectIdException Dim conn As CInformixConnection - conn = Me.getConnection(Nothing) + conn = Me.GetConnection conn.AutoCommit = False conn.startTransaction() Try @@ -214,10 +214,10 @@ conn.commit() Catch err As IfxException conn.rollback() - x = New OIDException(err.Message, err) + x = New ObjectIdException(err.Message, err) Catch err As Exception conn.rollback() - x = New OIDException(err.Message, err) + x = New ObjectIdException(err.Message, err) Finally Me.freeConnection(conn) If Not x Is Nothing Then @@ -241,7 +241,7 @@ ''' [rbanks] 11/12/2003 Created ''' </history> '''----------------------------------------------------------------------------- - Public Overrides Function getIdentityValue(ByVal conn As _CConnection) As Integer + Public Overrides Function getIdentityValue(ByVal conn As IConnection) As Integer Dim rs As New DataSet Dim da As New IfxDataAdapter Dim cb As IfxCommandBuilder @@ -284,7 +284,7 @@ ''' [rbanks] 23/01/2004 Created ''' </history> '''----------------------------------------------------------------------------- - Public Overrides Function getParamHolder(ByVal i As Integer) As String + Public Overrides Function getParameterHolder(ByVal i As Integer) As String Return "@p" & CStr(i) End Function @@ -300,7 +300,8 @@ Return Me.m_name & "." & owner & "." & table & " as " & pAlias End Function - Public Overloads Overrides Sub Dispose(ByVal disposing As Boolean) + Private m_disposed As Boolean + Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If Not m_disposed Then If disposing Then Dim conn As CInformixConnection Index: CInformixConnection.vb =================================================================== RCS file: /cvsroot/jcframework/dotnet/Providers/AF_Informix/CInformixConnection.vb,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- CInformixConnection.vb 1 Apr 2005 00:04:31 -0000 1.3 +++ CInformixConnection.vb 11 Apr 2005 00:31:45 -0000 1.4 @@ -1,5 +1,5 @@ Imports IBM.Data.Informix -Imports AToMSFramework +Imports AtomsFramework '''----------------------------------------------------------------------------- ''' Project : AToMSFramework @@ -9,7 +9,7 @@ ''' <summary> ''' Connection class for Informix data sources ''' </summary> -''' <remarks><para>This class implements the <see cref="T:AToMSFramework._CConnection"/> interface and is used +''' <remarks><para>This class implements the <see cref="T:AToMSFramework.IConnection"/> interface and is used ''' to manage connections to Informix datasources.</para> ''' <para>The following should be taken into consideration when using this ''' class:</para> @@ -21,13 +21,13 @@ ''' outside transactions to also roll back.</para> ''' <para>Built against client SDK version 2.81.TC3 ''' </remarks> -''' <seealso cref="T:AToMSFramework._CConnection"/> +''' <seealso cref="T:AToMSFramework.IConnection"/> ''' <history> ''' [rbanks] 18/12/2003 Created ''' </history> '''----------------------------------------------------------------------------- Public Class CInformixConnection - Implements _CConnection + Implements IConnection Implements IDisposable '************************************************** @@ -42,7 +42,7 @@ Private m_transaction As IfxTransaction Private m_transactioncalls As Integer Private m_references As Integer - Private m_db As _CRelationalDatabase + Private m_db As IRelationalDatabase Private Const DEBUG_MODE As Boolean = True Private m_disposed As Boolean @@ -67,7 +67,7 @@ '''----------------------------------------------------------------------------- ''' <summary> - ''' See <see cref="P:AToMSFramework._CConnection.AutoCommit">_CConnection</see>. + ''' See <see cref="P:AToMSFramework.IConnection.AutoCommit">IConnection</see>. ''' </summary> ''' <value></value> ''' <remarks></remarks> @@ -75,7 +75,7 @@ ''' [rbanks] 1/12/2003 Created ''' </history> '''----------------------------------------------------------------------------- - Public Property AutoCommit() As Boolean Implements _CConnection.AutoCommit + Public Property AutoCommit() As Boolean Implements IConnection.AutoCommit Get AutoCommit = m_autoCommit End Get @@ -86,7 +86,7 @@ '''----------------------------------------------------------------------------- ''' <summary> - ''' See <see cref="P:AToMSFramework._CConnection.Started">_CConnection</see>. + ''' See <see cref="P:AToMSFramework.IConnection.Started">IConnection</see>. ''' </summary> ''' <value></value> ''' <remarks></remarks> @@ -94,7 +94,7 @@ ''' [rbanks] 1/12/2003 Created ''' </history> '''----------------------------------------------------------------------------- - Public Property Started() As Boolean Implements _CConnection.Started + Public Property Started() As Boolean Implements IConnection.Started Get Started = m_started End Get @@ -105,7 +105,7 @@ '''----------------------------------------------------------------------------- ''' <summary> - ''' See <see cref="P:AToMSFramework._CConnection.ManageTransactions">_CConnection</see>. + ''' See <see cref="P:AToMSFramework.IConnection.ManageTransactions">IConnection</see>. ''' </summary> ''' <value></value> ''' <remarks></remarks> @@ -113,7 +113,7 @@ ''' [rbanks] 1/12/2003 Created ''' </history> '''----------------------------------------------------------------------------- - Public Property ManageTransactions() As Boolean Implements _CConnection.ManageTransactions + Public Property ManageTransactions() As Boolean Implements IConnection.ManageTransactions Get ManageTransactions = m_manageTransactions End Get @@ -124,14 +124,14 @@ '''----------------------------------------------------------------------------- ''' <summary> - ''' See <see cref="M:AToMSFramework._CConnection.commit">_CConnection</see>. + ''' See <see cref="M:AToMSFramework.IConnection.commit">IConnection</see>. ''' </summary> ''' <remarks></remarks> ''' <history> ''' [rbanks] 1/12/2003 Created ''' </history> '''----------------------------------------------------------------------------- - Public Sub commit() Implements _CConnection.commit + Public Sub commit() Implements IConnection.commit If DEBUG_MODE Then If m_transactioncalls = 1 Then System.Diagnostics.Debug.WriteLine("COMMIT TRANSACTION") @@ -166,13 +166,13 @@ '''----------------------------------------------------------------------------- ''' <summary> - ''' See <see cref="M:AToMSFramework._CConnection.startTransaction">_CConnection</see>. + ''' See <see cref="M:AToMSFramework.IConnection.startTransaction">IConnection</see>. ''' </summary> ''' <history> ''' [rbanks] 1/12/2003 Created ''' </history> '''----------------------------------------------------------------------------- - Public Overloads Sub startTransaction() Implements _CConnection.startTransaction + Public Overloads Sub startTransaction() Implements IConnection.startTransaction If DEBUG_MODE Then If m_transactioncalls = 0 Then System.Diagnostics.Debug.WriteLine("BEGIN TRANSACTION") @@ -192,7 +192,7 @@ '''----------------------------------------------------------------------------- ''' <summary> - ''' See <see cref="M:AToMSFramework._CConnection.processStatement">_CConnection</see>. + ''' See <see cref="M:AToMSFramework.IConnection.processStatement">IConnection</see>. ''' </summary> ''' <param name="statement"></param> ''' <remarks></remarks> @@ -201,10 +201,10 @@ ''' [rbanks] 23/01/2004 Changed to use SQL parameters ''' </history> '''----------------------------------------------------------------------------- - Public Sub processStatement(ByVal statement As CSqlStatement) Implements _CConnection.processStatement + Public Sub processStatement(ByVal statement As AtomsSqlStatement) Implements IConnection.processStatement Dim m_command As New IfxCommand Dim m_recordcount As Integer - Dim cp As CSQLParameter + Dim cp As AtomsSqlParameter Dim param As IfxParameter Dim dd As Date @@ -235,7 +235,7 @@ '''----------------------------------------------------------------------------- ''' <summary> - ''' See <see cref="M:AToMSFramework._CConnection.processSelectStatement">_CConnection</see>. + ''' See <see cref="M:AToMSFramework.IConnection.processSelectStatement">IConnection</see>. ''' </summary> ''' <param name="statement"></param> ''' <returns></returns> @@ -244,10 +244,10 @@ ''' [rbanks] 1/12/2003 Created ''' </history> '''----------------------------------------------------------------------------- - Public Function processSelectStatement(ByVal statement As CSqlStatement) As CResultset Implements _CConnection.processSelectStatement + Public Function processSelectStatement(ByVal statement As AtomsSqlStatement) As ResultSet Implements IConnection.processSelectStatement SyncLock GetType(CInformixConnection) Dim x As RetrieveException - Dim rs As New CResultset + Dim rs As New ResultSet Dim param As IfxParameter Dim dd As Date Dim m_command As New IfxCommand @@ -258,7 +258,7 @@ m_command.Connection = m_connection m_command.CommandText = statement.SqlString - For Each cp As CSQLParameter In statement.Parameters + For Each cp As AtomsSqlParameter In statement.Parameters If Not cp.Ignore Then param = New IfxParameter param.ParameterName = cp.Name @@ -287,15 +287,15 @@ '''----------------------------------------------------------------------------- ''' <summary> - ''' See <see cref="M:AToMSFramework._CConnection.rollback">_CConnection</see>. + ''' See <see cref="M:AToMSFramework.IConnection.rollback">IConnection</see>. ''' </summary> ''' <remarks></remarks> ''' <history> ''' [rbanks] 1/12/2003 Created ''' </history> '''----------------------------------------------------------------------------- - Public Sub rollback() Implements _CConnection.rollback - Dim pb As CPersistenceBroker + Public Sub rollback() Implements IConnection.rollback + Dim pb As PersistenceBroker If DEBUG_MODE Then If m_transactioncalls = 1 Then System.Diagnostics.Debug.WriteLine("ROLLBACK TRANSACTION") @@ -329,14 +329,14 @@ '''----------------------------------------------------------------------------- ''' <summary> - ''' See <see cref="M:AToMSFramework._CConnection.CloseConnection">_CConnection</see>. + ''' See <see cref="M:AToMSFramework.IConnection.CloseConnection">IConnection</see>. ''' </summary> ''' <remarks></remarks> ''' <history> ''' [rbanks] 1/12/2003 Created ''' </history> '''----------------------------------------------------------------------------- - Public Sub CloseConnection() Implements _CConnection.CloseConnection + Public Sub CloseConnection() Implements IConnection.CloseConnection m_references -= 1 If m_references = 0 Then m_connection.Close() @@ -345,7 +345,7 @@ '''----------------------------------------------------------------------------- ''' <summary> - ''' See <see cref="P:AToMSFramework._CConnection.IsClosed">_CConnection</see>. + ''' See <see cref="P:AToMSFramework.IConnection.IsClosed">IConnection</see>. ''' </summary> ''' <value></value> ''' <remarks></remarks> @@ -353,7 +353,7 @@ ''' [rbanks] 1/12/2003 Created ''' </history> '''----------------------------------------------------------------------------- - Public ReadOnly Property IsClosed() As Boolean Implements _CConnection.IsClosed + Public ReadOnly Property IsClosed() As Boolean Implements IConnection.IsClosed Get Return m_connection.State = ConnectionState.Closed End Get @@ -361,7 +361,7 @@ '''----------------------------------------------------------------------------- ''' <summary> - ''' See <see cref="P:AToMSFramework._CConnection.ReferenceCount">_CConnection</see>. + ''' See <see cref="P:AToMSFramework.IConnection.ReferenceCount">IConnection</see>. ''' </summary> ''' <value></value> ''' <remarks></remarks> @@ -369,7 +369,7 @@ ''' [rbanks] 1/12/2003 Created ''' </history> '''----------------------------------------------------------------------------- - Public Property ReferenceCount() As Integer Implements _CConnection.ReferenceCount + Public Property ReferenceCount() As Integer Implements IConnection.ReferenceCount Get Return m_references End Get @@ -380,7 +380,7 @@ '''----------------------------------------------------------------------------- ''' <summary> - ''' See <see cref="P:AToMSFramework._CConnection.getTableSchema">_CConnection</see>. + ''' See <see cref="P:AToMSFramework.IConnection.getTableSchema">IConnection</see>. ''' </summary> ''' <param name="tName"></param> ''' <returns></returns> @@ -389,7 +389,7 @@ ''' [rbanks] 1/12/2003 Created ''' </history> '''----------------------------------------------------------------------------- - Public Function getTableSchema(ByVal tName As String) As System.Data.DataTable Implements _CConnection.getTableSchema + Public Function getTableSchema(ByVal tName As String) As System.Data.DataTable Implements IConnection.getTableSchema Dim statement As String Dim cmd As IfxCommand Dim dr As IfxDataReader @@ -407,7 +407,7 @@ Return dt End Function - Public Overloads Sub startTransaction(ByVal isolationLevel As System.Data.IsolationLevel) Implements _CConnection.startTransaction + Public Overloads Sub startTransaction(ByVal isolationLevel As System.Data.IsolationLevel) Implements IConnection.startTransaction If DEBUG_MODE Then If m_transactioncalls = 0 Then System.Diagnostics.Debug.WriteLine("BEGIN TRANSACTION") @@ -425,11 +425,11 @@ End If End Sub - Public Property Database() As _CRelationalDatabase Implements _CConnection.Database + Public Property Database() As IRelationalDatabase Implements IConnection.Database Get Return m_db End Get - Set(ByVal Value As _CRelationalDatabase) + Set(ByVal Value As IRelationalDatabase) m_db = Value End Set End Property Index: AF_Informix.vbproj =================================================================== RCS file: /cvsroot/jcframework/dotnet/Providers/AF_Informix/AF_Informix.vbproj,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- AF_Informix.vbproj 7 Feb 2005 13:22:06 -0000 1.2 +++ AF_Informix.vbproj 11 Apr 2005 00:31:45 -0000 1.3 @@ -1,112 +1,112 @@ -<VisualStudioProject> - <VisualBasic - ProjectType = "Local" - ProductVersion = "7.10.3077" - SchemaVersion = "2.0" - ProjectGuid = "{09659A30-0220-42BF-9478-267278E89692}" - > - <Build> - <Settings - ApplicationIcon = "" - AssemblyKeyContainerName = "" - AssemblyName = "AF_Informix" - AssemblyOriginatorKeyFile = "" - AssemblyOriginatorKeyMode = "None" - DefaultClientScript = "JScript" - DefaultHTMLPageLayout = "Grid" - DefaultTargetSchema = "IE50" - DelaySign = "false" - OutputType = "Library" - OptionCompare = "Binary" - OptionExplicit = "On" - OptionStrict = "Off" - RootNamespace = "AF_Informix" - StartupObject = "" - > - <Config - Name = "Debug" - BaseAddress = "285212672" - ConfigurationOverrideFile = "" - DefineConstants = "" - DefineDebug = "true" - DefineTrace = "true" - DebugSymbols = "true" - IncrementalBuild = "true" - Optimize = "false" - OutputPath = "bin\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "false" - WarningLevel = "1" - /> - <Config - Name = "Release" - BaseAddress = "285212672" - ConfigurationOverrideFile = "" - DefineConstants = "" - DefineDebug = "false" - DefineTrace = "true" - DebugSymbols = "false" - IncrementalBuild = "false" - Optimize = "true" - OutputPath = "bin\" - RegisterForComInterop = "false" - RemoveIntegerChecks = "false" - TreatWarningsAsErrors = "false" - WarningLevel = "1" - /> - </Settings> - <References> - <Reference - Name = "System" - AssemblyName = "System" - /> - <Reference - Name = "System.Data" - AssemblyName = "System.Data" - /> - <Reference - Name = "System.XML" - AssemblyName = "System.Xml" - /> - <Reference - Name = "AToMSFramework" - Project = "{8FFD05CF-E733-4D8E-BC0E-D9DD37B87384}" - Package = "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}" - /> - <Reference - Name = "IBM.Data.Informix" - AssemblyName = "IBM.Data.Informix" - HintPath = "..\..\..\..\..\Program Files\Informix\Client-SDK\bin\IBM.Data.Informix.dll" - /> - </References> - <Imports> - <Import Namespace = "Microsoft.VisualBasic" /> - <Import Namespace = "System" /> - <Import Namespace = "System.Collections" /> - <Import Namespace = "System.Data" /> - <Import Namespace = "System.Diagnostics" /> - </Imports> - </Build> - <Files> - <Include> - <File - RelPath = "AssemblyInfo.vb" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "CInformixConnection.vb" - SubType = "Code" - BuildAction = "Compile" - /> - <File - RelPath = "CInformixDatabase.vb" - SubType = "Code" - BuildAction = "Compile" - /> - </Include> - </Files> - </VisualBasic> -</VisualStudioProject> - +<VisualStudioProject> + <VisualBasic + ProjectType = "Local" + ProductVersion = "7.10.3077" + SchemaVersion = "2.0" + ProjectGuid = "{09659A30-0220-42BF-9478-267278E89692}" + > + <Build> + <Settings + ApplicationIcon = "" + AssemblyKeyContainerName = "" + AssemblyName = "AF_Informix" + AssemblyOriginatorKeyFile = "" + AssemblyOriginatorKeyMode = "None" + DefaultClientScript = "JScript" + DefaultHTMLPageLayout = "Grid" + DefaultTargetSchema = "IE50" + DelaySign = "false" + OutputType = "Library" + OptionCompare = "Binary" + OptionExplicit = "On" + OptionStrict = "Off" + RootNamespace = "AtomsFramework.Providers.Informix" + StartupObject = "AtomsFramework.Providers.Informix.(None)" + > + <Config + Name = "Debug" + BaseAddress = "285212672" + ConfigurationOverrideFile = "" + DefineConstants = "" + DefineDebug = "true" + DefineTrace = "true" + DebugSymbols = "true" + IncrementalBuild = "true" + Optimize = "false" + OutputPath = "bin\" + RegisterForComInterop = "false" + RemoveIntegerChecks = "false" + TreatWarningsAsErrors = "false" + WarningLevel = "1" + /> + <Config + Name = "Release" + BaseAddress = "285212672" + ConfigurationOverrideFile = "" + DefineConstants = "" + DefineDebug = "false" + DefineTrace = "true" + DebugSymbols = "false" + IncrementalBuild = "false" + Optimize = "true" + OutputPath = "bin\" + RegisterForComInterop = "false" + RemoveIntegerChecks = "false" + TreatWarningsAsErrors = "false" + WarningLevel = "1" + /> + </Settings> + <References> + <Reference + Name = "System" + AssemblyName = "System" + /> + <Reference + Name = "System.Data" + AssemblyName = "System.Data" + /> + <Reference + Name = "System.XML" + AssemblyName = "System.Xml" + /> + <Reference + Name = "IBM.Data.Informix" + AssemblyName = "IBM.Data.Informix" + HintPath = "..\..\..\..\..\Program Files\Informix\Client-SDK\bin\IBM.Data.Informix.dll" + /> + <Reference + Name = "Atoms.Framework" + Project = "{8FFD05CF-E733-4D8E-BC0E-D9DD37B87384}" + Package = "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}" + /> + </References> + <Imports> + <Import Namespace = "Microsoft.VisualBasic" /> + <Import Namespace = "System" /> + <Import Namespace = "System.Collections" /> + <Import Namespace = "System.Data" /> + <Import Namespace = "System.Diagnostics" /> + </Imports> + </Build> + <Files> + <Include> + <File + RelPath = "AssemblyInfo.vb" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "CInformixConnection.vb" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "CInformixDatabase.vb" + SubType = "Code" + BuildAction = "Compile" + /> + </Include> + </Files> + </VisualBasic> +</VisualStudioProject> + |