Skip to content

Commit

Permalink
Revert "chg for smoke while trying to do dev work on NativeLibrary us…
Browse files Browse the repository at this point in the history
…e for netcoreapp3.0"

This reverts commit 500676c.
  • Loading branch information
ericsink committed Jun 16, 2019
1 parent 500676c commit 7a766f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 37 deletions.
31 changes: 1 addition & 30 deletions test_nupkgs/smoke/Program.cs
@@ -1,42 +1,13 @@
using System;
using SQLitePCL;
using SQLitePCL.Ugly;

namespace smoke
{
class Program
{
class MyGetFunctionPointer : IGetFunctionPointer
{
readonly IntPtr _dll;
public MyGetFunctionPointer(IntPtr dll)
{
_dll = dll;
}

public IntPtr GetFunctionPointer(string name)
{
if (NativeLibrary.TryGetExport(_dll, name, out var f))
{
//System.Console.WriteLine("{0}.{1} : {2}", _dll, name, f);
return f;
}
else
{
return IntPtr.Zero;
}
}
}
static void DoDynamic(string name)
{
var dll = SQLitePCL.NativeLibrary.Load(name);
var gf = new MyGetFunctionPointer(dll);
SQLitePCL.SQLite3Provider_Cdecl.Setup(gf);
SQLitePCL.raw.SetProvider(new SQLite3Provider_Cdecl());
}
static void Main(string[] args)
{
DoDynamic("e_sqlite3.dll");
SQLitePCL.Batteries_V2.Init();
using (var db = ugly.open(":memory:"))
{
var s = db.query_scalar<string>("SELECT sqlite_version()");
Expand Down
9 changes: 2 additions & 7 deletions test_nupkgs/smoke/smoke.csproj
Expand Up @@ -2,16 +2,11 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\SQLitePCLRaw.provider.dynamic\SQLitePCLRaw.provider.dynamic.csproj" />
<ProjectReference Include="..\..\src\SQLitePCLRaw.nativelibrary\SQLitePCLRaw.nativelibrary.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="sqlitepclraw.lib.e_sqlite3" Version="$(pkg_version_for_testing)" />
<PackageReference Include="sqlitepclraw.bundle_e_sqlite3" Version="$(pkg_version_for_testing)" />
<PackageReference Include="sqlitepclraw.ugly" Version="$(pkg_version_for_testing)" />
</ItemGroup>

Expand Down

0 comments on commit 7a766f7

Please sign in to comment.