Пример #1
0
        public static void SortOfAUnitTest()
        {
            MemoryStream memoryStream = new MemoryStream();
            BinaryWriter binaryWriter = new BinaryWriter((Stream)memoryStream);
            BinaryReader reader       = new BinaryReader((Stream)memoryStream);
            int          num1         = 0;

            bool[] flagArray1 = new bool[28];
            flagArray1[3]  = true;
            flagArray1[14] = true;
            bool[]     flagArray2     = flagArray1;
            BitsByte[] bitsByteArray1 = BitsByte.ComposeBitsBytesChain(num1 != 0, flagArray2);
            foreach (BitsByte bitsByte in bitsByteArray1)
            {
                byte num2 = (byte)bitsByte;
                binaryWriter.Write(num2);
            }
            memoryStream.Position = 0L;
            BitsByte[] bitsByteArray2 = BitsByte.DecomposeBitsBytesChain(reader);
            string     str1           = "";
            string     str2           = "";

            foreach (BitsByte bitsByte in bitsByteArray1)
            {
                str1 = str1 + (object)(byte)bitsByte + ", ";
            }
            foreach (BitsByte bitsByte in bitsByteArray2)
            {
                str2 = str2 + (object)(byte)bitsByte + ", ";
            }
            Main.NewText("done", byte.MaxValue, byte.MaxValue, byte.MaxValue, false);
        }
Пример #2
0
        // Token: 0x06000193 RID: 403 RVA: 0x0002E014 File Offset: 0x0002C214
        public static void SortOfAUnitTest()
        {
            MemoryStream memoryStream = new MemoryStream();
            BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
            BinaryReader reader       = new BinaryReader(memoryStream);
            bool         arg_25_0     = false;

            bool[] expr_1C = new bool[28];
            expr_1C[3]  = true;
            expr_1C[14] = true;
            BitsByte[] array  = BitsByte.ComposeBitsBytesChain(arg_25_0, expr_1C);
            BitsByte[] array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                byte b = array2[i];
                binaryWriter.Write(b);
            }
            memoryStream.Position = 0L;
            BitsByte[] array3 = BitsByte.DecomposeBitsBytesChain(reader);
            string     arg    = "";
            string     arg2   = "";

            array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                BitsByte bb = array2[i];
                arg = arg + bb + ", ";
            }
            array2 = array3;
            for (int i = 0; i < array2.Length; i++)
            {
                BitsByte bb2 = array2[i];
                arg2 = arg2 + bb2 + ", ";
            }
            Main.NewText("done", 255, 255, 255, false);
        }