Files
Rendezvous/src/FinalFactory.Rendezvous.TestClient/Program.cs
T
KyuubiYoru 7e3be2cad1
quality-gate / quality (push) Failing after 1m3s
feat(tooling): add standalone rendezvous test client (#25)
2026-07-16 11:05:56 +02:00

30 lines
824 B
C#

namespace FinalFactory.Rendezvous.TestClient;
public static class Program
{
public static async Task<int> Main(string[] args)
{
using CancellationTokenSource shutdown = new();
ConsoleCancelEventHandler cancelHandler = (_, eventArgs) =>
{
eventArgs.Cancel = true;
shutdown.Cancel();
};
Console.CancelKeyPress += cancelHandler;
try
{
TestClientApplication application = new(new RendezvousCommandRunner());
return await application.RunAsync(
args,
Console.In,
Console.Out,
Console.Error,
shutdown.Token).ConfigureAwait(false);
}
finally
{
Console.CancelKeyPress -= cancelHandler;
}
}
}