Exemplo n.º 1
0
        static int GetEncodeSize(Array array, bool arrayEncoding, out int width)
        {
            int size = FixedWidth.FormatCode + ArrayEncoding.GetValueSize(array, null);

            width = arrayEncoding ? FixedWidth.UInt : AmqpEncoding.GetEncodeWidthByCountAndSize(array.Length, size);
            size += FixedWidth.FormatCode + width + width;
            return(size);
        }
Exemplo n.º 2
0
        private static int GetEncodeSize(Array array, bool arrayEncoding, out int width)
        {
            int valueSize = 1 + ArrayEncoding.GetValueSize(array, null);

            width     = (arrayEncoding ? 4 : AmqpEncoding.GetEncodeWidthByCountAndSize(array.Length, valueSize));
            valueSize = valueSize + 1 + width + width;
            return(valueSize);
        }