System.Data.SQLite
Check-in [5c8311fbd4]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Some CultureInfo fixes for String.Format.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5c8311fbd4412c7b237bdcafa7cdb66e12abfd45
User & Date: mistachkin 2015-08-12 22:32:20
Context
2015-08-12
22:33
When building for Mono, target the .NET Framework 4.5.x, not 4.6. check-in: ce51a749e0 user: mistachkin tags: trunk
22:32
Some CultureInfo fixes for String.Format. check-in: 5c8311fbd4 user: mistachkin tags: trunk
22:25
Fix typo in the previous check-in. check-in: ea0c351664 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to System.Data.SQLite/SQLiteEnlistment.cs.

    92     92           // NOTE: When in "strict" mode, throw an exception if the isolation
    93     93           //       level is not recognized; otherwise, fallback to the default
    94     94           //       isolation level specified by the caller.
    95     95           //
    96     96           if (throwOnUnsupported)
    97     97           {
    98     98               throw new InvalidOperationException(
    99         -                UnsafeNativeMethods.StringFormat(CultureInfo.InvariantCulture,
           99  +                UnsafeNativeMethods.StringFormat(CultureInfo.CurrentCulture,
   100    100                   "unsupported isolation level {0}", isolationLevel));
   101    101           }
   102    102   
   103    103           return defaultIsolationLevel;
   104    104       }
   105    105   
   106    106       ///////////////////////////////////////////////////////////////////////////

Changes to System.Data.SQLite/SQLiteException.cs.

   180    180       /// <returns>Error message text for the return code.</returns>
   181    181       private static string GetStockErrorMessage(
   182    182           SQLiteErrorCode errorCode,
   183    183           string message
   184    184           )
   185    185       {
   186    186           return UnsafeNativeMethods.StringFormat(
   187         -            CultureInfo.InvariantCulture,
          187  +            CultureInfo.CurrentCulture,
   188    188               "{0}{1}{2}",
   189    189               GetErrorString(errorCode),
   190    190   #if !NET_COMPACT_20
   191    191               Environment.NewLine, message).Trim();
   192    192   #else
   193    193               "\r\n", message).Trim();
   194    194   #endif

Changes to System.Data.SQLite/SQLiteModule.cs.

  6854   6854           protected virtual string GetFunctionKey(
  6855   6855               int argumentCount,
  6856   6856               string name,
  6857   6857               SQLiteFunction function
  6858   6858               )
  6859   6859           {
  6860   6860               return UnsafeNativeMethods.StringFormat(
  6861         -                CultureInfo.CurrentCulture,
         6861  +                CultureInfo.InvariantCulture,
  6862   6862                   "{0}:{1}", argumentCount, name);
  6863   6863           }
  6864   6864           #endregion
  6865   6865   
  6866   6866           ///////////////////////////////////////////////////////////////////////
  6867   6867   
  6868   6868           #region Table Declaration Helper Methods

Changes to System.Data.SQLite/SQLiteModuleCommon.cs.

    21     21           #region Private Constants
    22     22           /// <summary>
    23     23           /// The CREATE TABLE statement used to declare the schema for the
    24     24           /// virtual table.
    25     25           /// </summary>
    26     26           private static readonly string declareSql =
    27     27               UnsafeNativeMethods.StringFormat(
    28         -                CultureInfo.CurrentCulture, "CREATE TABLE {0}(x);",
           28  +                CultureInfo.InvariantCulture, "CREATE TABLE {0}(x);",
    29     29                   typeof(SQLiteModuleCommon).Name);
    30     30           #endregion
    31     31   
    32     32           ///////////////////////////////////////////////////////////////////////
    33     33   
    34     34           #region Private Data
    35     35           /// <summary>

Changes to System.Data.SQLite/UnsafeNativeMethods.cs.

   128    128         /// This type is only present when running on Mono.
   129    129         /// </summary>
   130    130         private static readonly string MonoRuntimeType = "Mono.Runtime";
   131    131   
   132    132         /// <summary>
   133    133         /// Keeps track of whether we are running on Mono.  Initially null, it is
   134    134         /// set by the <see cref="IsMono" /> method on its first call.  Later, it
   135         -      /// is returned verbatim.
          135  +      /// is returned verbatim by the <see cref="IsMono" /> method.
   136    136         /// </summary>
   137    137         private static bool? isMono = null;
   138    138   
   139    139         /// <summary>
   140    140         /// Determines whether or not this assembly is running on Mono.
   141    141         /// </summary>
   142    142         /// <returns>