示例#1
0
 static StockJsonBuffers()
 {
     JsonBufferWriter writer = new JsonBufferWriter(2);
     writer.WriteStartObject();
     writer.WriteEndObject();
     EmptyObject = writer.GetBuffer();
 }
示例#2
0
        static StockJsonBuffers()
        {
            JsonBufferWriter writer = new JsonBufferWriter(2);

            writer.WriteStartObject();
            writer.WriteEndObject();
            EmptyObject = writer.GetBuffer();
        }
示例#3
0
        public virtual ObjectConstructionResult CreateObject(ImportContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            JsonBufferWriter tailw = _tailw;

            _tailw = null;
            if (tailw != null)
            {
                tailw.WriteEndObject();
            }
            JsonBuffer tail = (tailw != null ? tailw.GetBuffer() : StockJsonBuffers.EmptyObject);
            object     obj  = OnCreateObject(context);

            return(new ObjectConstructionResult(obj, tail.CreateReader()));
        }