/// <summary>
 /// Initializes a new instance of the <see cref="MessagePackReader"/> struct.
 /// </summary>
 /// <param name="memory">The buffer to read from.</param>
 public MessagePackReader(ReadOnlyMemory <byte> memory)
 {
     this.reader = new SequenceReader <byte>(memory);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MessagePackReader"/> struct.
 /// </summary>
 /// <param name="readOnlySequence">The sequence to read from.</param>
 public MessagePackReader(ReadOnlySequence <byte> readOnlySequence)
 {
     this.reader = new SequenceReader <byte>(readOnlySequence);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MessagePackReader"/> struct.
 /// </summary>
 /// <param name="memory">The buffer to read from.</param>
 public MessagePackReader(ReadOnlyMemory <byte> memory)
     : this()
 {
     this.reader = new SequenceReader <byte>(memory);
     this.Depth  = 0;
 }