Ejemplo n.º 1
0
 public XdrBuffer(XdrBuffer prevChunk = null)
 {
     buffer = XdrBufferFactory.Rent(DefaultBufferSize);
     Data   = buffer.Buffer;
     if (prevChunk != null)
     {
         PrevChunk            = prevChunk;
         prevChunkTotalLength = prevChunk.TotalLength;
     }
 }
Ejemplo n.º 2
0
 public XdrStreamWriter(Stream stream)
 {
     if (stream == null)
     {
         throw new ArgumentNullException(nameof(stream));
     }
     if (!stream.CanWrite)
     {
         throw new ArgumentException("Stream is not writable");
     }
     this.stream  = stream;
     sharedBuffer = XdrBufferFactory.Rent(DefaultBufferSize);
 }
Ejemplo n.º 3
0
 public XdrStreamReader(Stream stream)
 {
     this.stream = stream;
     buffer      = XdrBufferFactory.Rent();
 }