Beispiel #1
0
        public void Map(Action <IFlexBufferMapBuilder> map)
        {
            var start   = _buffer.StartVector();
            var builder = new FlexBufferMapBuilder(_buffer);

            map(builder);
            _buffer.SortAndEndMap(start);
        }
Beispiel #2
0
        public void Map(string key, Action <IFlexBufferMapBuilder> map)
        {
            _buffer.AddKey(key);
            var start   = _buffer.StartVector();
            var builder = new FlexBufferMapBuilder(_buffer);

            map(builder);
            _buffer.SortAndEndMap(start);
        }
Beispiel #3
0
        public static byte[] Map(Action <IFlexBufferMapBuilder> map)
        {
            var buffer  = new FlexBuffer();
            var start   = buffer.StartVector();
            var builder = new FlexBufferMapBuilder(buffer);

            map(builder);
            buffer.SortAndEndMap(start);
            return(buffer.Finish());
        }