Пример #1
0
 public BlittableJsonDocumentBuilder(JsonOperationContext context, JsonParserState state, IJsonParser reader, BlittableWriter <UnmanagedWriteBuffer> writer = null)
 {
     _context = context;
     _state   = state;
     _reader  = reader;
     _writer  = writer ?? new BlittableWriter <UnmanagedWriteBuffer>(context);
 }
Пример #2
0
 public BlittableJsonDocumentBuilder(
     JsonOperationContext context,
     UsageMode mode, string debugTag,
     IJsonParser reader, JsonParserState state,
     BlittableWriter <UnmanagedWriteBuffer> writer = null,
     IBlittableDocumentModifier modifier           = null) : this(context, state, reader, writer, modifier)
 {
     Renew(debugTag, mode);
 }
 /// <summary>
 /// Allows incrementally building json document
 /// </summary>
 /// <param name="context"></param>
 /// <param name="mode"></param>
 /// <param name="writer"></param>
 public ManualBlittableJsonDocumentBuilder(
     JsonOperationContext context,
     UsageMode?mode = null,
     BlittableWriter <TWriter> writer = null)
 {
     _context = context;
     _mode    = mode ?? UsageMode.None;
     _writer  = writer ?? new BlittableWriter <TWriter>(_context);
 }
Пример #4
0
        public BlittableJsonDocumentBuilder(JsonOperationContext context, JsonParserState state, IJsonParser reader,
                                            BlittableWriter <UnmanagedWriteBuffer> writer = null,
                                            IBlittableDocumentModifier modifier           = null)
        {
            _context  = context;
            _state    = state;
            _reader   = reader;
            _modifier = modifier;
            _writer   = writer ?? new BlittableWriter <UnmanagedWriteBuffer>(context);

            _cacheItem       = GlobalCache.Allocate();
            _propertiesCache = _cacheItem.PropertyCache;
            _positionsCache  = _cacheItem.PositionsCache;
            _tokensCache     = _cacheItem.TokensCache;
        }