Beispiel #1
0
        /// <summary>
        /// Disposes this instance.
        /// </summary>
        public async Task DisposeAsync()
        {
            if (!string.IsNullOrEmpty(_vmId))
            {
                _hubProxy.Response_VM -= OnResponseReceived;
                await _hubProxy.Dispose_VM(_vmId);

                _vmId = null;
            }
        }
Beispiel #2
0
 /// <summary>
 /// Disposes this instance.
 /// </summary>
 public async Task DisposeAsync()
 {
     if (!string.IsNullOrEmpty(_vmId))
     {
         _hubProxy.Response_VM -= OnResponseReceived;
         if (_hubProxy.ConnectionState == HubConnectionState.Connected)
         {
             await _hubProxy.Dispose_VM(_vmId);
         }
         _vmId = null;
     }
 }