38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
namespace LaaProduction.Console
|
|
{
|
|
using LaaPackages.HttpClient;
|
|
using LaaPackages.SqlClient;
|
|
using LaaProduction.Data.Cordonel;
|
|
using LaaProduction.Data.Cordonel.Sentinel;
|
|
|
|
using System;
|
|
|
|
public class Program
|
|
{
|
|
const string URL_PATTERN = "https://nodes.sms-esaap.com/keygenproxy/api/v2/keys/devices?orderNumber={0}&radioaddress={1}";
|
|
const string X_NODE_TOKEN_HEADER = "X-Node-Token";
|
|
const string X_NODE_TOKEN = "d5b8c0b2-81f6-4421-80d0-44eb2093e616";
|
|
|
|
public static void Main(String[] args)
|
|
{
|
|
var http = new HttpConnection("http://10.49.40.25/");
|
|
var sql = new SqlConnection("Server=SLASQL01.emea.sensus.net; Database=Auftrag; User ID=sa; Password=sqlserver;");
|
|
//var dbContext = new CordonelDbContext(sql);
|
|
//var requirements = dbContext.Requirements.FindByPcbId("212120036");
|
|
var sentinel = new Sentinel(http, sql);
|
|
var result = sentinel.CheckVFM(212120036);
|
|
|
|
if (result.Succeeded)
|
|
{
|
|
Console.WriteLine("OK");
|
|
}
|
|
else
|
|
{
|
|
foreach (var kvp in result)
|
|
{
|
|
Console.WriteLine($"{kvp.Key}: {kvp.Value}");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |