示例#1
0
 private Deserializer(Itemizer itemizer)
 {
     this.itemizer  = itemizer;
     this.types     = TypeCache.Instance;
     this.arrayBank = new Dictionary <TypeInfo, Stack <KeyValuePair <TypeInfo, IList> > >();
     this.valueBank = new BufferBank <MemberValue>();
 }
示例#2
0
 protected Parser(JsonContext context, Itemizer itemizer)
 {
     this.context               = context;
     this.itemizer              = itemizer;
     this.keyCache              = new Dictionary <Key, Key>(Constants.BufferSize, KeyComparer.Instance);
     this.parseKeys             = new BufferBank <Key>();
     this.parseValues           = new BufferBank <JsonValue>();
     this.values                = new Dictionary <ValueData, JsonValue>(Constants.BufferSize, ValueDataComparer.Instance);
     this.emptyValuesArray      = new ValueList(Parser.EmptyValues, this.context);
     this.emptyValuesDictionary = new ValueList(Parser.EmptyKeys, Parser.EmptyValues, this.context);
     this.context.InvalidValue  = new JsonValue(new ValueData(default, this.emptyValuesArray));