[pgsqlclient-checkins] pgsqlclient/PostgreSql.Data.PGSqlClient/source PGDataReader.cs,1.9,1.10 PGErr
Status: Inactive
Brought to you by:
carlosga_fb
From: <car...@us...> - 2003-07-29 10:14:56
|
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source In directory sc8-pr-cvs1:/tmp/cvs-serv1312 Modified Files: PGDataReader.cs PGErrorCollection.cs PGParameterCollection.cs Log Message: * Changed cultureAwareCompare method in PGDataReader and all Collection classes for use it in a better way, and allow it to run on Mono:: Index: PGDataReader.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGDataReader.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PGDataReader.cs 29 Jul 2003 09:26:20 -0000 1.9 --- PGDataReader.cs 29 Jul 2003 10:14:53 -0000 1.10 *************** *** 776,780 **** private bool cultureAwareCompare(string strA, string strB) { ! return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.IgnoreCase) == 0 ? true : false; } --- 776,787 ---- private bool cultureAwareCompare(string strA, string strB) { ! try ! { ! return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.IgnoreCase) == 0 ? true : false; ! } ! catch (NotSupportedException) ! { ! return strA.ToUpper() == strB.ToUpper() ? true : false; ! } } Index: PGErrorCollection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGErrorCollection.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PGErrorCollection.cs 16 Jul 2003 20:17:49 -0000 1.2 --- PGErrorCollection.cs 29 Jul 2003 10:14:53 -0000 1.3 *************** *** 102,106 **** private bool cultureAwareCompare(string strA, string strB) { ! return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.IgnoreCase) == 0 ? true : false; } --- 102,113 ---- private bool cultureAwareCompare(string strA, string strB) { ! try ! { ! return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.IgnoreCase) == 0 ? true : false; ! } ! catch (NotSupportedException) ! { ! return strA.ToUpper() == strB.ToUpper() ? true : false; ! } } Index: PGParameterCollection.cs =================================================================== RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGParameterCollection.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PGParameterCollection.cs 27 Jul 2003 21:19:17 -0000 1.3 --- PGParameterCollection.cs 29 Jul 2003 10:14:53 -0000 1.4 *************** *** 253,257 **** private bool cultureAwareCompare(string strA, string strB) { ! return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.IgnoreCase) == 0 ? true : false; } --- 253,264 ---- private bool cultureAwareCompare(string strA, string strB) { ! try ! { ! return CultureInfo.CurrentCulture.CompareInfo.Compare(strA, strB, CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth | CompareOptions.IgnoreCase) == 0 ? true : false; ! } ! catch (NotSupportedException) ! { ! return strA.ToUpper() == strB.ToUpper() ? true : false; ! } } |