コード例 #1
0
        void ICborMapReader <MapReaderContext> .ReadMapItem(ref CborReader reader, ref MapReaderContext context)
        {
            CborValue key   = Read(ref reader);
            CborValue value = Read(ref reader);

            context.obj.Add(key, value);
        }
コード例 #2
0
        CborObject?ICborConverter <CborObject?> .Read(ref CborReader reader)
        {
            if (reader.ReadNull())
            {
                return(null);
            }

            MapReaderContext mapContext = new MapReaderContext();

            reader.ReadMap(this, ref mapContext);
            return(mapContext.obj);
        }
コード例 #3
0
 void ICborMapReader <MapReaderContext> .ReadBeginMap(int size, ref MapReaderContext context)
 {
     context.obj = new CborObject();
 }