コード例 #1
0
        public void UnpackAndRepackEnsureIsTheSame()
        {
            var ordered       = files.ToList().OrderBy(x => x).Reverse();
            var expected_data = ordered.Select(x => File.ReadAllBytes(x)).ToList();


            var memObject = romService.LoadParallelByteMem(files) as parallelByteMem;

            var result = memObject.GenerateOutput().ToList();

            var res = result.Zip(expected_data, (x, y) => x.data.SequenceEqual(y));

            Assert.IsTrue(res.All(x => x));
        }
コード例 #2
0
        private void LoadByteFiles()
        {
            OpenFileDialog dialog = new OpenFileDialog();

            dialog.Filter = "Any (*.*)| *.*";

            dialog.Multiselect = true;

            var result = dialog.ShowDialog();

            if (result == true)
            {
                this.MemObject = romService.LoadParallelByteMem(dialog.FileNames);
            }
        }