Beispiel #1
0
        public void Save(string directory)
        {
            IndexContainer?.Save(directory, ConfigContainer);
            RootFile?.Write(directory, this);
            DownloadFile?.Write(directory, this);
            DownloadSizeFile?.Write(directory, this);
            InstallFile?.Write(directory, this);
            EncodingFile?.Write(directory, ConfigContainer);
            ConfigContainer?.Save(directory);

            RootFile?.FileLookup?.Close();
        }
Beispiel #2
0
        public void Save(string directory)
        {
            // if this field exists and mismatches the generated file; the client will error
            // if this field is missing the client will generate the file and variable itself
            ConfigContainer?.CDNConfig?.GetValues("archive-group")?.Clear();

            IndexContainer?.Save(directory, ConfigContainer);
            RootFile?.Write(directory, this);
            DownloadFile?.Write(directory, this);
            DownloadSizeFile?.Write(directory, this);
            InstallFile?.Write(directory, this);
            EncodingFile?.Write(directory, ConfigContainer);
            ConfigContainer?.Save(directory);

            RootFile?.FileLookup?.Close();
        }
Beispiel #3
0
        public void TestCKeys()
        {
            // WOW-28807patch8.1.0_PTR

            string ckey = "0105f03cb8b8faceda8ea099c2f2f476";

            Indices.IndexFile index = new Indices.IndexFile(Path.Combine(PATH, @"data\01\05", "0105f03cb8b8faceda8ea099c2f2f476.index"));
            index.Write("test");
            Assert.AreEqual(ckey, index.Checksum.ToString());

            //ckey = "1228b5ef225fa4b85eebc5e32b1ca238";
            //RootFile rootFile = new RootFile(PATH, new MD5Hash("fc52ef45efbbc6beca39076f89bad99f"));
            //Assert.AreEqual(ckey, rootFile.Write(@"test").CKey.ToString());

            ckey = "1de5b9ebaa9c117f0c2d5430f8b296d4";
            RootFile rootFileV2 = new RootFile(PATH, new MD5Hash("923b2669b887c65b2271405ce51a052b"));

            Assert.AreEqual(ckey, rootFileV2.Write("test").CKey.ToString());

            ckey = "9faeafadd4ee3fa03de41eb2360e7f46";
            EncodingFile encodingFile = new EncodingFile(PATH, new MD5Hash("c08602c3fe517a2a2eec27f6cffbb627"));

            Assert.AreEqual(ckey, encodingFile.Write("test").CKey.ToString());

            ckey = "22c7766aae84c1efb081c458d43a5bc7";
            Install.InstallFile installFile = new Install.InstallFile(PATH, new MD5Hash("c6ebc4d0b75f279b7d8259715d76107a"));
            Assert.AreEqual(ckey, installFile.Write("test").CKey.ToString());

            ckey = "21f3d8cf8c1e49ce90aa81cec19eef89";
            Download.DownloadFile downloadFile = new Download.DownloadFile(PATH, new MD5Hash("b8e459cff125e452e404714d29bc20e3"));
            downloadFile.DownloadHeader.IncludeChecksum = true;
            Assert.AreEqual(ckey, downloadFile.Write("test").CKey.ToString());

            ckey = "a934b6684ac4fd35a9cde796fc5d3f25";
            Download.DownloadSizeFile downloadSizeFile = new Download.DownloadSizeFile(PATH, new MD5Hash("001cc5c73390ac2f5882d65edea4751b"));
            Assert.AreEqual(ckey, downloadSizeFile.Write("test").CKey.ToString());
        }