public static void Run(string url, Guid cashboxId, string receiptExampleDirectory) { _cashBoxId = cashboxId; _pos = SoapPosFactory.CreatePosAsync(new ClientOptions { Url = new Uri(url) }).Result; _examples = LoadExamples(receiptExampleDirectory, cashboxId); ExecuteEcho("Test"); while (true) { Menu(); } }
public static async Task RunAsync(string url, Guid cashboxId, string receiptExampleDirectory) { _cashBoxId = cashboxId; var retryOptions = new RetryPolicyOptions { ClientTimeout = TimeSpan.FromSeconds(90), DelayBetweenRetries = TimeSpan.FromSeconds(5), Retries = 3 }; _pos = await SoapPosFactory.CreatePosAsync(new ClientOptions { Url = new Uri(url), RetryPolicyOptions = retryOptions }); _examples = LoadExamples(receiptExampleDirectory, cashboxId); await ExecuteEchoAsync("Test"); while (true) { await MenuAsync(); } }
protected override ifPOS.v1.IPOS CreateClient() => SoapPosFactory.CreatePosAsync(new ClientOptions { Url = new Uri(_url) }).Result;