Exemplo n.º 1
0
 public void ResetAndRenew()
 {
     _unmanagedWriteBuffer.Dispose();
     _unmanagedWriteBuffer = (TWriter)(object)_context.GetStream(_lastSize);
     _position             = 0;
     _innerBuffer          = _context.GetMemory(32);
 }
Exemplo n.º 2
0
 public UnmanagedJsonParser(JsonOperationContext ctx, JsonParserState state, string debugTag)
 {
     _ctx                  = ctx;
     _state                = state;
     _debugTag             = debugTag;
     _unmanagedWriteBuffer = ctx.GetStream(JsonOperationContext.InitialStreamSize);
 }
Exemplo n.º 3
0
 public UnmanagedJsonParser(JsonOperationContext ctx, JsonParserState state, string debugTag)
 {
     _ctx          = ctx;
     _state        = state;
     _debugTag     = debugTag;
     _stringBuffer = ctx.GetStream();
 }
Exemplo n.º 4
0
        public void NewDocument()
        {
            _maybeBeforePreamble = true;
            var previous = _unmanagedWriteBuffer.SizeInBytes;

            _unmanagedWriteBuffer.Dispose();
            _unmanagedWriteBuffer = _ctx.GetStream(previous);
        }
Exemplo n.º 5
0
 public HashCalculator(JsonOperationContext ctx)
 {
     _buffer = ctx.GetStream(JsonOperationContext.InitialStreamSize);
 }
Exemplo n.º 6
0
 public QueryHashCalculator(JsonOperationContext ctx)
 {
     _buffer = ctx.GetStream();
 }
Exemplo n.º 7
0
 public HashCalculator(JsonOperationContext ctx)
 {
     _context = ctx ?? throw new ArgumentNullException(nameof(ctx));
     _buffer  = _context.GetStream(JsonOperationContext.InitialStreamSize);
 }
Exemplo n.º 8
0
 public void NewDocument()
 {
     _maybeBeforePreamble = true;
     _unmanagedWriteBuffer.Dispose();
     _unmanagedWriteBuffer = _ctx.GetStream();
 }
Exemplo n.º 9
0
 public void NewDocument()
 {
     _maybeBeforePreamble = true;
     _stringBuffer.Dispose();
     _stringBuffer = _ctx.GetStream();
 }