public T Receive <T>() { using (var capture = StreamCapture.New()) { var result = ReadBsonMessage <T>(); ReadStreams(capture); log.Write(EventType.Diagnostic, "Received: {0}", result); return(result); } }
public void Send <T>(T message) { using (var capture = StreamCapture.New()) { WriteBsonMessage(message); WriteEachStream(capture.SerializedStreams); } log.Write(EventType.Diagnostic, "Sent: {0}", message); }