public object Send(ChaosInvocation invocation) { var req = invocation.ToAnyProto(); var reply = _client.SendInvocation(req); var invocationResp = reply.ConvertTo <ChaosInvocationResp>(); if (invocationResp.DataTypeFullName == null) { return(null); } return(_chaosConverter.ToData(invocationResp)); }
public object Send(ChaosInvocation invocation) { var data = _binarySerializer.Serialize(invocation); object resp = null; lock (_lock) { _singal = new AutoResetEvent(false); _client.Send(data); if (!_singal.WaitOne(_config.Value.WaitTimeout)) { throw new TimeoutException(); } resp = _chaosConverter.ToData(_reply); } return(resp); }