Esempio n. 1
0
 // Token: 0x060001A1 RID: 417 RVA: 0x000060DC File Offset: 0x000042DC
 public static T[] ReadDataArray <T>(ref ByteBuffer buffer)
 {
     T[] array = new T[(int)buffer.ReadUInt16()];
     for (int i = 0; i < array.Length; i++)
     {
         array[i] = DataTypeIO.Load <T>(ref buffer);
     }
     return(array);
 }
Esempio n. 2
0
        // Token: 0x060001A3 RID: 419 RVA: 0x00006158 File Offset: 0x00004358
        public static int SizeOfDataArray <T>(T[] array)
        {
            int num = 2;

            for (int i = 0; i < array.Length; i++)
            {
                num += DataTypeIO.SizeOf <T>(array[i]);
            }
            return(num);
        }
Esempio n. 3
0
 // Token: 0x060001A2 RID: 418 RVA: 0x00006114 File Offset: 0x00004314
 public static void WriteDataArray <T>(ref ByteBuffer buffer, T[] array)
 {
     if (array.Length > 65535)
     {
         throw ByteBuffer.Overflow();
     }
     buffer.WriteUInt16((ushort)array.Length);
     for (int i = 0; i < array.Length; i++)
     {
         DataTypeIO.Save <T>(ref buffer, array[i]);
     }
 }