System.Data.SQLite
Check-in [8cb9380f11]
Not logged in

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

Overview
Comment:Workaround inability to use Contains method in a LINQ query when running on the .NET Framework 3.5 (testlinq). Cleanup variables leaked by test basic-1.14. Add configuration file to make the mixed-mode .NET Framework 2.0 assembly loadable by the .NET Framework 4.0 compiled Eagle shell.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8cb9380f1179173f61759656155d08feed1f4743
User & Date: mistachkin 2011-09-23 19:08:45
Context
2011-09-23
19:32
Rename the 'enumerableToString' test suite helper procedure to the more correct 'enumerableToList'. check-in: 4194bc2cb4 user: mistachkin tags: trunk
19:08
Workaround inability to use Contains method in a LINQ query when running on the .NET Framework 3.5 (testlinq). Cleanup variables leaked by test basic-1.14. Add configuration file to make the mixed-mode .NET Framework 2.0 assembly loadable by the .NET Framework 4.0 compiled Eagle shell. check-in: 8cb9380f11 user: mistachkin tags: trunk
2011-09-22
05:39
The NuGet package should support both the .NET Framework 2.0 and 4.0. check-in: a9a0ee70ff user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added Externals/Eagle/bin/EagleShell.exe.config.































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?xml version="1.0" encoding="UTF-8" ?>
<!--
 *
 * EagleShell.exe.config -
 *
 * Copyright (c) 2007-2010 by Joe Mistachkin.  All rights reserved.
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: $
 *
-->
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
  </startup>

  <runtime>
    <!--
    <NetFx40_LegacySecurityPolicy enabled="true" />
    <generatePublisherEvidence enabled="false" />
    -->

    <!--
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Eagle"
                          publicKeyToken="29c6297630be05eb"
                          culture="neutral" />

        <bindingRedirect oldVersion="1.0.0.0-1.0.9999.65535"
                         newVersion="[info engine PatchLevel]" />
      </dependentAssembly>

      <dependentAssembly>
        <assemblyIdentity name="Eagle"
                          publicKeyToken="1e22ec67879739a2"
                          culture="neutral" />

        <bindingRedirect oldVersion="1.0.0.0-1.0.9999.65535"
                         newVersion="[info engine PatchLevel]" />
      </dependentAssembly>
    </assemblyBinding>
    -->
  </runtime>
</configuration>

Changes to Tests/basic.eagle.

793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
    lappend result [list $name $rows($name)]
  }

  set result
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints \
{eagle culture.en_US monoBug28 command.sql compile.DATA System.Data.SQLite} \
-result [subst {{1 {{x 1} {y2 {Wednesday, 16 December 2009}}}} {2 {{x 2} {y2\
12:00:00}}} {3 {{x 3} {y2 {Wednesday, 16 December 2009 12:00:00}}}} {4 {{x 4}\
{y2 12/16/2009}}} {5 {{x 5} {y2 12:00}}} {6 {{x 6} {y2 {12/16/2009 12:00}}}} {7\
{{x 7} {y2 2009-12-16T00:00:00.0000000Z}}} {8 {{x 8} {y2\
${date}T12:00:00.0000000Z}}} {9 {{x 9} {y2 2009-12-16T12:00:00.0000000Z}}}\







|







793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
    lappend result [list $name $rows($name)]
  }

  set result
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain name rows result db fileName
} -constraints \
{eagle culture.en_US monoBug28 command.sql compile.DATA System.Data.SQLite} \
-result [subst {{1 {{x 1} {y2 {Wednesday, 16 December 2009}}}} {2 {{x 2} {y2\
12:00:00}}} {3 {{x 3} {y2 {Wednesday, 16 December 2009 12:00:00}}}} {4 {{x 4}\
{y2 12/16/2009}}} {5 {{x 5} {y2 12:00}}} {6 {{x 6} {y2 {12/16/2009 12:00}}}} {7\
{{x 7} {y2 2009-12-16T00:00:00.0000000Z}}} {8 {{x 8} {y2\
${date}T12:00:00.0000000Z}}} {9 {{x 9} {y2 2009-12-16T12:00:00.0000000Z}}}\

Changes to testlinq/Program.cs.

267
268
269
270
271
272
273






















274
275
276
277
278
279
280
...
281
282
283
284
285
286
287

288
289
290
291
292
293
294
              }
          }
          else
          {
              using (northwindEFEntities db = new northwindEFEntities())
              {
                  bool once = false;






















                  var query = from t in db.Territories
                    where territoryIds.AsQueryable<long>().Contains<long>(t.TerritoryID)
                    orderby t.TerritoryID
                    select t;

                  foreach (Territories territories in query)
                  {
................................................................................
                      if (once)
                          Console.Write(' ');

                      Console.Write(territories.TerritoryID);

                      once = true;
                  }

              }
          }

          return 0;
      }

    private static int OldTests()







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>







267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
...
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
              }
          }
          else
          {
              using (northwindEFEntities db = new northwindEFEntities())
              {
                  bool once = false;
#if NET_20
                  //
                  // HACK: We cannot use the Contains extension method within a
                  //       LINQ query with the .NET Framework 3.5.
                  //
                  var query = from t in db.Territories
                    orderby t.TerritoryID
                    select t;

                  foreach (Territories territories in query)
                  {
                      if (Array.IndexOf(territoryIds, territories.TerritoryID) == -1)
                          continue;

                      if (once)
                          Console.Write(' ');

                      Console.Write(territories.TerritoryID);

                      once = true;
                  }
#else
                  var query = from t in db.Territories
                    where territoryIds.AsQueryable<long>().Contains<long>(t.TerritoryID)
                    orderby t.TerritoryID
                    select t;

                  foreach (Territories territories in query)
                  {
................................................................................
                      if (once)
                          Console.Write(' ');

                      Console.Write(territories.TerritoryID);

                      once = true;
                  }
#endif
              }
          }

          return 0;
      }

    private static int OldTests()