protected JsonReader(SerializationContext context, char[] buffer = null) { if (context == null) { throw new ArgumentNullException("context"); } if (buffer != null && buffer.Length < 1024) { throw new ArgumentOutOfRangeException("buffer", "Buffer should be at least 1024 chars long."); } this.Context = context; this.lazyValue = new LazyValueInfo(this); this.buffer = new Buffer(this, buffer); }
protected JsonReader(SerializationContext context, int bufferSize = DEFAULT_BUFFER_SIZE) { if (context == null) { throw new ArgumentNullException("context"); } if (bufferSize <= 0) { throw new IndexOutOfRangeException("bufferSize"); } this.Context = context; lazyValue = new LazyValueInfo(this); buffer = new Buffer(bufferSize, this); }