1 message in com.mysql.lists.dotnetConnector/NET commit: r142 - in branc...
FromSent OnAttachments
rbur...@mysql.com18 Aug 2005 12:51 
Subject:Connector/NET commit: r142 - in branches/1.0: . mysqlclient
From:rbur...@mysql.com (rbur@mysql.com)
Date:08/18/2005 12:51:49 PM
List:com.mysql.lists.dotnet

Modified: branches/1.0/Client.build branches/1.0/MySQLClient.sln branches/1.0/mysqlclient/Exception.cs branches/1.0/mysqlclient/MySqlError.cs Log: Exception.cs - some fxcop fixes MySqlError.cs - more fxcop fixes other files are build process improvements

Modified: branches/1.0/Client.build =================================================================== --- branches/1.0/Client.build 2005-08-18 16:34:39 UTC (rev 141) +++ branches/1.0/Client.build 2005-08-18 19:52:11 UTC (rev 142) @@ -81,6 +81,7 @@ <target name="test-net-1.1" depends="net-1.1"> <property name="framework" value="net-1.1"/> <call target="testclient"/> + <call target="fxcop"/> </target>

<target name="test-net-1.0" depends="net-1.0"> @@ -90,20 +91,22 @@

<!-- target to run the test suite --> <target name="testclient" description="Target to run NUnit tests"> + <mkdir dir="results"/> <echo message="Stopping all services"/> <servicecontroller action="Stop" service="MySql4.0"/> <servicecontroller action="Stop" service="MySql4.1"/> <servicecontroller action="Stop" service="MySql5.0"/>

<echo message="Testing MySQL 4.0"/> - <property name="excludes" value="4.1, 5.0, NotWorking"/> + <property name="excludes" value="4.1,5.0,NotWorking"/> + <property name="config_file" value="socket.config"/> <servicecontroller action="Start" service="MySql4.0"/> <call target="testdb"/>

<echo message="Testing MySQL 4.1"/> <servicecontroller action="Stop" service="MySql4.0"/> <servicecontroller action="Start" service="MySql4.1"/> - <property name="excludes" value="5.0, NotWorking"/> + <property name="excludes" value="5.0,NotWorking"/> <call target="testdb"/>

<echo message="Testing MySQL 5.0"/> @@ -114,19 +117,18 @@ </target>

<target name="testdb" description="Target to test a database with all possible
configurations"> - <nunit2 verbose="true"> - <formatter type="Plain" /> - <test assemblyname="bin/${framework}/${buildType}/MySql.Data.Tests.dll" - appconfig="testsuite/configs/socket.config"> - <categories> - <exclude name="4.1"/> - <exclude name="5.0"/> - <exclude name="NotWorking" /> - </categories> - </test> - </nunit2> + <copy file="testsuite/configs/${config_file}"
tofile="bin/${framework}/${buildType}/MySql.Data.Tests.dll.config"/> + <exec program="${nunit}\nunit-console.exe" + commandline="/exclude=${excludes}
/xml=../../../results/nunit-${framework}-${buildType}.xml
bin/${framework}/${buildType}/MySql.Data.Tests.dll" + failonerror="true"/> </target>

+ <target name="FXCop" description="Runs FXCop"> + <exec program="${fxcop.executable}" + commandline="/o:results/fxcop-${framework}-${buildType}.xml /c
/f:bin/${framework}/${buildType}/MySql.Data.dll /s" + failonerror="false"/> + </target> + <!-- documentation target --> <target name="Docs" description="Documentation"> <ndoc>

Modified: branches/1.0/MySQLClient.sln =================================================================== --- branches/1.0/MySQLClient.sln 2005-08-18 16:34:39 UTC (rev 141) +++ branches/1.0/MySQLClient.sln 2005-08-18 19:52:11 UTC (rev 142) @@ -5,6 +5,7 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySql.Data.Tests",
"TestSuite\MySql.Data.Tests.csproj", "{92CB29DF-61DE-4277-8DC6-D3587C7311EE}" ProjectSection(ProjectDependencies) = postProject + {5EAEFBC4-8389-4120-BAB3-9B27174F6F6F} =
{5EAEFBC4-8389-4120-BAB3-9B27174F6F6F} EndProjectSection EndProject Global

Modified: branches/1.0/mysqlclient/Exception.cs =================================================================== --- branches/1.0/mysqlclient/Exception.cs 2005-08-18 16:34:39 UTC (rev 141) +++ branches/1.0/mysqlclient/Exception.cs 2005-08-18 19:52:11 UTC (rev 142) @@ -28,7 +28,7 @@ /// </summary> /// <include file='docs/MySqlException.xml'
path='MyDocs/MyMembers[@name="Class"]/*'/> [Serializable] - public sealed class MySqlException : ApplicationException + public sealed class MySqlException : SystemException { private int errorCode; private bool isFatal; @@ -37,7 +37,7 @@ { }

- internal MySqlException( string msg, Exception ex ) : base(msg, ex) + internal MySqlException(string msg, Exception ex) : base(msg, ex) { }

@@ -45,17 +45,17 @@ { }

- internal MySqlException( string msg, bool isFatal, Exception inner ) : base
(msg, inner) + internal MySqlException(string msg, bool isFatal, Exception inner) : base
(msg, inner) { this.isFatal = isFatal; }

- internal MySqlException(string msg, int errno) : base(msg) + internal MySqlException(string msg, int errno) : this(msg) { errorCode = errno; }

- internal MySqlException(SerializationInfo info, + private MySqlException(SerializationInfo info, StreamingContext context) : base(info, context) { }

Modified: branches/1.0/mysqlclient/MySqlError.cs =================================================================== --- branches/1.0/mysqlclient/MySqlError.cs 2005-08-18 16:34:39 UTC (rev 141) +++ branches/1.0/mysqlclient/MySqlError.cs 2005-08-18 19:52:11 UTC (rev 142) @@ -28,25 +28,40 @@ public class MySqlError { /// <summary></summary> - public string level; + private string level;

/// <summary></summary> - public uint code; + private uint code;

/// <summary></summary> - public string message; + private string message;

/// <summary></summary> /// <param name="level"></param> /// <param name="code"></param> /// <param name="message"></param> - public MySqlError( string level, uint code, string message ) + public MySqlError(string level, uint code, string message) { this.level = level; this.code = code; this.message = message; }

+ public string Level + { + get { return level; } + } + + public uint Code + { + get { return code; } + } + + public string Message + { + get { return message; } + } + /* ER_HASHCHK=1000, ER_NISAMCHK=1001, ER_NO=1002, @@ -71,7 +86,7 @@ ER_DISK_FULL 1021 */ /// <summary>Duplicate key was found</summary> - public static int DuplicateKey = 1022; + public const int DuplicateKey = 1022;

/* ER_ERROR_ON_CLOSE 1023 ER_ERROR_ON_READ 1024 @@ -83,7 +98,7 @@ ER_GET_ERRNO 1030 ER_ILLEGAL_HA 1031*/ /// <summary>Key was not found</summary> - public static int KeyNotFound = 1032; + public const int KeyNotFound = 1032; /* ER_NOT_FORM_FILE 1033 ER_NOT_KEYFILE 1034 ER_OLD_KEYFILE 1035 @@ -113,10 +128,10 @@ ER_TOO_LONG_IDENT 1059 ER_DUP_FIELDNAME 1060*/ /// <summary>Duplicate key name</summary> - public static int DuplicateKeyName = 1061; + public const int DuplicateKeyName = 1061;

/// <summary>Duplicate key entry</summary> - public static int DuplicateKeyEntry = 1062; + public const int DuplicateKeyEntry = 1062;

/* ER_WRONG_FIELD_SPEC 1063 ER_PARSE_ERROR 1064 @@ -187,16 +202,16 @@ ER_HOST_IS_BLOCKED 1129 */ /// <summary>Host not privileged</summary> - public static int HostNotPrivileged = 1130; + public const int HostNotPrivileged = 1130;

/// <summary>Not sure</summary> - public static int AnonymousUser = 1131; + public const int AnonymousUser = 1131;

/// <summary>Passwords are not allowed on this account</summary> - public static int PasswordNotAllowed = 1132; + public const int PasswordNotAllowed = 1132;

/// <summary>Passwords do not match</summary> - public static int PasswordNoMatch = 1133; + public const int PasswordNoMatch = 1133; /* ER_UPDATE_INFO 1134 ER_CANT_CREATE_THREAD 1135 ER_WRONG_VALUE_COUNT_ON_ROW 1136