public MemoryMappedOutputStream(MemoryMappedFileMessageSender sender, CancellationToken cancellationToken) { _sender = sender; _bytesWrittenAccessor = sender._bytesWrittenAccessor; _messageCompletedAccessor = sender._messageCompletedAccessor; _stream = sender._stream; _messageCancelledEvent = sender._messageCancelledEvent; _bytesWrittenEvent = sender._bytesWrittenEvent; _bytesReadEvent = sender._bytesReadEvent; _cancellationToken = cancellationToken; }