protected async Task OnStopAsync() { if (_endpoint != null) { await _endpoint.StopEndpoint().ConfigureAwait(false); } await PerformOnStopOperations().ConfigureAwait(false); }
private static async Task AsyncMain() { _endpoint.Initialize(); await _endpoint.StartEndpoint(); Console.Title = "NSB.Client"; try { await SendOrder() .ConfigureAwait(false); } finally { _endpoint.StopEndpoint(); } }
static void OnProcessExit(object sender, EventArgs e) { _endpoint.StopEndpoint(); }