System.Data.SQLite

Check-in [d90a4098ca]
Login

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

Overview
Comment:Minor coding style cleanup.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d90a4098ca32d6c43aa2c8b430c87c4ac18735b5
User & Date: mistachkin 2019-08-01 01:30:04.921
Context
2019-09-27
00:26
Update the estimated date for the next release. check-in: d838a0288f user: mistachkin tags: trunk
2019-08-01
01:30
Minor coding style cleanup. check-in: d90a4098ca user: mistachkin tags: trunk
01:25
Enhance the target framework abbreviation handling. check-in: 02695316e9 user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to System.Data.SQLite/UnsafeNativeMethods.cs.
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125

2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
      /// </returns>
      private static string AbbreviateTargetFramework(
          string targetFramework
          )
      {
          if (!String.IsNullOrEmpty(targetFramework))
          {
              lock (staticSyncRoot)
              {
                  string abbreviation;

                  if (targetFrameworkAbbreviations != null)
                  {
                      if (targetFrameworkAbbreviations.TryGetValue(
                              targetFramework, out abbreviation))
                      {
                          return abbreviation;
                      }
                  }


                  //
                  // HACK: *LEGACY* Fallback to the old method of
                  //       abbreviating target framework names.
                  //
                  int index = targetFramework.IndexOf(
                      ".NETFramework,Version=v");

                  if (index != -1)
                  {
                      abbreviation = targetFramework;

                      abbreviation = abbreviation.Replace(
                          ".NETFramework,Version=v", "net");

                      abbreviation = abbreviation.Replace(
                          ".", String.Empty);

                      index = abbreviation.IndexOf(',');

                      if (index != -1)
                          return abbreviation.Substring(0, index);
                      else
                          return abbreviation;
                  }
              }
          }

          return targetFramework;
      }

      /////////////////////////////////////////////////////////////////////////







|
|
|
|








|
>
|
|
|
|
|
|

|
|
|

|
|

|
|

|

|
|
|
|
<







2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149

2150
2151
2152
2153
2154
2155
2156
      /// </returns>
      private static string AbbreviateTargetFramework(
          string targetFramework
          )
      {
          if (!String.IsNullOrEmpty(targetFramework))
          {
              string abbreviation;

              lock (staticSyncRoot)
              {
                  if (targetFrameworkAbbreviations != null)
                  {
                      if (targetFrameworkAbbreviations.TryGetValue(
                              targetFramework, out abbreviation))
                      {
                          return abbreviation;
                      }
                  }
              }

              //
              // HACK: *LEGACY* Fallback to the old method of
              //       abbreviating target framework names.
              //
              int index = targetFramework.IndexOf(
                  ".NETFramework,Version=v");

              if (index != -1)
              {
                  abbreviation = targetFramework;

                  abbreviation = abbreviation.Replace(
                      ".NETFramework,Version=v", "net");

                  abbreviation = abbreviation.Replace(
                      ".", String.Empty);

                  index = abbreviation.IndexOf(',');

                  if (index != -1)
                      return abbreviation.Substring(0, index);
                  else
                      return abbreviation;

              }
          }

          return targetFramework;
      }

      /////////////////////////////////////////////////////////////////////////