Beispiel #1
0
        /// <summary>
        /// IServerStreamWriter Methods.
        /// </summary>
        public Task WriteAsync(TResponse message)
        {
            var bytes = MessagePackSerializer.Serialize(message, context.SerializerOptions);

            logger.WriteToStream(context, bytes, typeof(TResponse));
            return(innerWriter.WriteAsync(bytes));
        }
Beispiel #2
0
        /// <summary>
        /// IServerStreamWriter Methods.
        /// </summary>
        public Task WriteAsync(TResponse message)
        {
            var bytes = LZ4MessagePackSerializer.Serialize(message, context.FormatterResolver);

            logger.WriteToStream(context, bytes, typeof(TResponse));
            return(innerWriter.WriteAsync(bytes));
        }
 public Task WriteAsync(T message)
 {
     logger.WriteToStream(context);
     return(writer.WriteAsync(message));
 }