示例#1
0
 public Task DisconnectAsync()
 {
     if (eventSource != null)
     {
         eventSource.Dispose();
         eventSource = null;
     }
     return(client.DisconnectAsync());
 }
示例#2
0
        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);
        }