Example #1
0
        public void Clear()
        {
            CDNIndex?.Clear();
            CDNIndex = null;

            foreach (var stream in DataStreams)
            {
                stream.Value.Dispose();
            }

            DataStreams.Clear();

            EncodingHandler?.Clear();
            EncodingHandler = null;

            InstallHandler?.Clear();
            InstallHandler = null;

            LocalIndex?.Clear();
            LocalIndex = null;

            RootHandler?.Clear();
            RootHandler = null;

            DownloadHandler?.Clear();
            DownloadHandler = null;
        }
Example #2
0
        public void MergeInstall(InstallHandler install)
        {
            if (install == null)
            {
                return;
            }

            foreach (var entry in install.GetEntries())
            {
                CreateSubTree(Root, Hasher.ComputeHash(entry.Name), entry.Name);
            }
        }
Example #3
0
        private CASCHandler(CASCConfig config) : base(config)
        {
            using (var fs = OpenEncodingFile(this))
                EncodingHandler = new EncodingHandler(fs);

            if ((CASCConfig.LoadFlags & LoadFlags.Download) != 0)
            {
                using (var fs = OpenDownloadFile(EncodingHandler, this))
                    DownloadHandler = new DownloadHandler(fs);
            }

            using (var fs = OpenRootFile(EncodingHandler, this))
                RootHandler = new WowRootHandler(fs);

            if ((CASCConfig.LoadFlags & LoadFlags.Install) != 0)
            {
                using (var fs = OpenInstallFile(EncodingHandler, this))
                    InstallHandler = new InstallHandler(fs);
            }
        }