예제 #1
0
        public override byte[] EncodeListPacked(IList l)
        {
            var elems = new byte[l.Count][];

            for (var i = 0; i < l.Count; i++)
            {
                elems[i] = _elementType.EncodePacked(l[i]);
            }
            return(ByteUtil.Merge(elems));
        }
예제 #2
0
        public override byte[] EncodeListPacked(IList l)
        {
            if (l.Count != arraySize)
            {
                throw new Exception("List size (" + l.Count + ") != " + arraySize);
            }

            var elems = new byte[arraySize][];

            for (var i = 0; i < l.Count; i++)
            {
                elems[i] = elementType.EncodePacked(l[i]);
            }
            return(ByteUtil.Merge(elems));
        }