mirror of
https://github.com/soukoku/ntwain.git
synced 2026-01-26 21:48:36 +08:00
Added sample netcore console app placeholder.
This commit is contained in:
12
samples/NetCoreConsole/NetCoreConsole.csproj
Normal file
12
samples/NetCoreConsole/NetCoreConsole.csproj
Normal file
@@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\NTwain\NTwain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
23
samples/NetCoreConsole/Program.cs
Normal file
23
samples/NetCoreConsole/Program.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using NTwain;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace NetCoreConsole
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var config = new TwainConfigurationBuilder()
|
||||
.DefineApp(Assembly.GetExecutingAssembly())
|
||||
.Build();
|
||||
using (var session = new TwainSession(config))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
Console.WriteLine("Hello World!");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user