Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JsonGenerator"/> class.
 /// </summary>
 /// <param name="pipeline">Pipeline this component is a part of.</param>
 /// <param name="reader">The underlying store reader.</param>
 protected JsonGenerator(Pipeline pipeline, JsonStoreReader reader)
     : base(pipeline)
 {
     this.pipeline = pipeline;
     this.reader   = reader;
     this.streams  = new HashSet <string>();
     this.emitters = new Dictionary <int, ValueTuple <object, Action <JToken, DateTime> > >();
     this.reader.Seek(ReplayDescriptor.ReplayAll);
 }
Ejemplo n.º 2
0
        /// <inheritdoc />
        public virtual void OpenStore(string name, string path, KnownSerializers serializers = null)
        {
            if (serializers != null)
            {
                throw new ArgumentException("Serializers are not used by JsonStoreReader and must be null.", nameof(serializers));
            }

            this.Reader = new JsonStoreReader(name, path, this.extension);
        }