public Task DisconnectAsync() { if (eventSource != null) { eventSource.Dispose(); eventSource = null; } return(client.DisconnectAsync()); }
public async Task ConnectAsync(string host, string applicationName, string userName, string password, CancellationToken cancellationToken) { await client.ConnectAsync(host, applicationName, userName, password, cancellationToken); eventSource = new X2TransponderEventSource(client); }