ToProto() private method

private ToProto ( ) : TransactDataP
return TransactDataP
Ejemplo n.º 1
0
        public async static void WriteToFile(TransactData data, string fileName, string folderName)
        {
            byte[] destinationArray = new byte[0x40];
            destinationArray[0] = 1;
            destinationArray[1] = 5;
            byte[] buffer2 = data.ToProto().ToByteArray();
            int    length  = buffer2.Length;

            Array.Copy(BitConverter.GetBytes(length), 0, destinationArray, 2, 4);
            await FileUtil.WriteToFile(fileName, folderName, destinationArray, true);

            FileUtil.AppendToFile(fileName, folderName, buffer2);
        }
Ejemplo n.º 2
0
        public static void WriteToFile(TransactData data, string filePath)
        {
            byte[] array = new byte[64];
            array[0] = 1;
            array[1] = 5;
            TransactDataP transactDataP = data.ToProto();

            byte[] array2 = transactDataP.ToByteArray();
            int    num    = array2.Length;

            byte[] bytes = BitConverter.GetBytes(num);
            Array.Copy(bytes, 0, array, 2, 4);
            FileUtil.writeToFile(filePath, array, true);
            FileUtil.appendToFile(filePath, array2);
        }
Ejemplo n.º 3
0
 public async static void WriteToFile(TransactData data, string fileName, string folderName)
 {
     byte[] destinationArray = new byte[0x40];
     destinationArray[0] = 1;
     destinationArray[1] = 5;
     byte[] buffer2 = data.ToProto().ToByteArray();
     int length = buffer2.Length;
     Array.Copy(BitConverter.GetBytes(length), 0, destinationArray, 2, 4);
     await FileUtil.WriteToFile(fileName, folderName, destinationArray, true);
     FileUtil.AppendToFile(fileName, folderName, buffer2);
 }