/// <summary> /// Disposes this instance. /// </summary> public async Task DisposeAsync() { if (!string.IsNullOrEmpty(_vmId)) { _hubProxy.Response_VM -= OnResponseReceived; await _hubProxy.Dispose_VM(_vmId); _vmId = null; } }
/// <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; } }