public static void Write(this WritableBuffer buffer, byte[] source)
 {
     Write(buffer, source, 0, source.Length);
 }
Exemple #2
0
 public static WritableBufferOutput AsOutput(this WritableBuffer buffer)
 {
     return(new WritableBufferOutput(buffer));
 }
Exemple #3
0
 public WritableBufferWriter(WritableBuffer writableBuffer)
 {
     _writableBuffer = writableBuffer;
     _span           = writableBuffer.Buffer.Span;
 }
        public void CopyTo(bool chunk, WritableBuffer buffer)
        {
            foreach (var header in _headers)
            {
                buffer.Write(_headersStartBytes);
                buffer.Append(header.Key, TextEncoding.Utf8);
                buffer.Write(_headersSeperatorBytes);
                buffer.Append(header.Value.ToString(), TextEncoding.Utf8);
            }

            if (chunk)
            {
                buffer.Write(_chunkedHeaderBytes);
            }

            buffer.Write(_serverHeaderBytes);
            var date = _dateHeaderValueManager.GetDateHeaderValues().Bytes;
            buffer.Write(date);

            buffer.Write(_headersEndBytes);
        }
 public WritableBufferOutput(WritableBuffer writer) : this()
 {
     _writer = writer;
 }
 public WriteableBufferStream(WritableBuffer buffer)
 {
     _buffer = buffer;
 }
Exemple #7
0
 public WriteableBufferStream(WritableBuffer buffer)
 {
     _buffer = buffer;
 }