Ejemplo n.º 1
0
        private static object ReadString8Array(MsgSubStorageReader parser, MsgSubStorageReader.PropertyInfo propertyInfo)
        {
            int stringArrayLengthEntrySize = MsgStorageRulesTable.StringArrayLengthEntrySize;
            int num;

            byte[]   value = MsgStorageRulesTable.InternalReadLengthList(parser, propertyInfo, stringArrayLengthEntrySize, out num);
            string[] array = new string[num];
            int      num2  = 0;

            for (int num3 = 0; num3 != num; num3++)
            {
                int    num4  = BitConverter.ToInt32(value, num2);
                byte[] bytes = parser.ReadPropertyIndexStream(propertyInfo.Tag, num3, num4, 1);
                array[num3] = Util.AnsiBytesToString(bytes, num4, parser.MessageEncoding);
                num2       += stringArrayLengthEntrySize;
            }
            return(array);
        }
Ejemplo n.º 2
0
        private static object ReadArrayOfBinary(MsgSubStorageReader parser, MsgSubStorageReader.PropertyInfo propertyInfo)
        {
            int binaryArrayLengthEntrySize = MsgStorageRulesTable.BinaryArrayLengthEntrySize;
            int num;

            byte[]   value = MsgStorageRulesTable.InternalReadLengthList(parser, propertyInfo, binaryArrayLengthEntrySize, out num);
            byte[][] array = new byte[num][];
            int      num2  = 0;

            for (int num3 = 0; num3 != num; num3++)
            {
                int num4 = BitConverter.ToInt32(value, num2);
                array[num3] = new byte[num4];
                parser.ReadPropertyIndexStream(propertyInfo.Tag, num3, array[num3], num4, 0);
                num2 += binaryArrayLengthEntrySize;
            }
            return(array);
        }