public HotfixReader(Stream stream)
        {
            using (var bin = new BinaryReader(stream))
            {
                var identifier = new string(bin.ReadChars(4));
                stream.Position = 0;
                switch (identifier)
                {
                case "XFTH":
                    _reader = new HTFXReader(stream);
                    break;

                default:
                    throw new Exception("Hotfix type " + identifier + " is not supported!");
                }
            }
        }
示例#2
0
        public void CombineCache(string file)
        {
            if (!File.Exists(file))
            {
                return;
            }

            // parse the new cache
            var reader = new HTFXReader(file);

            if (reader.BuildId != BuildId)
            {
                return;
            }

            // add additional hotfix entries
            _reader.Combine(reader);
        }
        public void CombineCaches(params string[] files)
        {
            foreach (var file in files)
            {
                if (!File.Exists(file))
                {
                    continue;
                }

                // parse the new cache
                var reader = new HTFXReader(file);
                if (reader.BuildId != BuildId)
                {
                    continue;
                }

                // add additional hotfix entries
                _reader.Combine(reader);
            }
        }