protected override void Dispose(bool disposing) { if (this.isDisposed) { return; } if (disposing) { DeregistrationRequest pkt = new DeregistrationRequest(this.sys.ID); this.SendPacket(pkt); } isDisposed = true; }
public async Task <DeregistrationReply> DeregisterAsync(DeregistrationRequest request, CancellationToken token) { try { _logger.Trace("Calling DeregisterAsync with: " + request); return(await _rpcClient.InvokeAsync <DeregistrationReply>("Deregister", request, _maxRpcDurationSession, token)); } catch (JsonRpcException e) { _logger.Error(e, "Calling method DeregisterAsync failed: {0}. Exception: ", e.RpcMessage); throw; } catch (Exception e) { _logger.Error(e, "Calling method DeregisterAsync failed: "); throw; } }