private async Task ClientOnError( IServerStreamWriter <ResponseEnvelope> responseStream, Exception ex ) { await SendEnvelopeToClient(responseStream, new ResponseEnvelope { Payload = EnvelopeHelper.Pack(ex), PayloadType = ex.GetType().FullName, RxMethod = ResponseEnvelope.Types.RxMethod.Error }); }
private async Task ClientOnNext( IServerStreamWriter <ResponseEnvelope> responseStream, object payload ) { await SendEnvelopeToClient(responseStream, new ResponseEnvelope { Payload = EnvelopeHelper.Pack(payload), PayloadType = payload.GetType().FullName, RxMethod = ResponseEnvelope.Types.RxMethod.Next }); }