Esempio n. 1
0
        public static byte[] From(IEnumerable value, Options options = Options.ShareKeys | Options.ShareStrings | Options.ShareKeyVectors)
        {
            var buffer = new FlexBuffer(options: options);

            if (value is IDictionary dictionary)
            {
                buffer.AddDynamicMap(dictionary);
            }
            else
            {
                buffer.AddDynamicVector(value);
            }

            return(buffer.Finish());
        }