-
Notifications
You must be signed in to change notification settings - Fork 4
/
Program.cs
38 lines (34 loc) · 1.44 KB
/
Program.cs
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
using System;
using System.Threading.Tasks;
using fiskaltrust.ifPOS.v1.it;
using fiskaltrust.Middleware.SCU.IT.Test.Launcher.Helpers;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using fiskaltrust.Middleware.SCU.IT.EpsonRTPrinter;
namespace TestLauncher
{
public class Program
{
private static readonly string cashBoxId = "";
private static readonly string accessToken = "";
public static async Task Main()
{
var cashBoxConfiguration = await HelipadHelper.GetConfigurationAsync(cashBoxId, accessToken).ConfigureAwait(false);
var config = cashBoxConfiguration.ftSignaturCreationDevices[0];
config.Package = "fiskaltrust.Middleware.SCU.IT.Epson";
var serviceCollection = new ServiceCollection();
serviceCollection.AddStandardLoggers(LogLevel.Debug);
var bootStrapper = new ScuBootstrapper
{
Id = config.Id,
Configuration = config.Configuration
};
bootStrapper.ConfigureServices(serviceCollection);
var provider = serviceCollection.BuildServiceProvider();
var sscd = provider.GetRequiredService<IITSSCD>();
HostingHelper.SetupServiceForObject(config, sscd, provider.GetRequiredService<ILoggerFactory>());
Console.WriteLine("Press key to end program");
Console.ReadLine();
}
}
}