-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
29 lines (26 loc) · 912 Bytes
/
Program.cs
File metadata and controls
29 lines (26 loc) · 912 Bytes
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
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace PayrollEngine.Client.Tutorial.HelloPayrollEngineWorld;
/// <summary>The Payroll Engine hello world tutorial program</summary>
internal class Program
{
/// <summary>Program entry point</summary>
static async Task Main()
{
// http client
using var clientHandler = new HttpClientHandler();
using var payrollHttpClient = new PayrollHttpClient(clientHandler, "https://localhost", 44354);
// connection test
if (! await payrollHttpClient.IsConnectionAvailableAsync(TenantApiEndpoints.TenantsUrl()))
{
Console.WriteLine($"Backend connection {payrollHttpClient.Address} is not available.");
}
else
{
// connection available
Console.WriteLine("Hello, Payroll Engine World!");
}
Console.Read();
}
}