예제 #1
0
        private async ValueTask WriteInternal(WrappedMessage <TOutbound> message, PooledValueTaskSource <MessageId> source)
        {
            try
            {
                await this.writer.WriteAsync <WrappedMessage <TOutbound> >(this.wrappedWriter, message);

                source.SetResult(message.Id);
            }
            catch (Exception ex)
            {
                source.SetException(ex);
            }
        }