Exemple #1
0
        public CASCHandlerBase(CASCConfig config)
        {
            Config   = config;
            CDNIndex = CDNIndexHandler.Initialize(config);

            if (!config.OnlineMode)
            {
                CDNCache.Enabled = false;
                LocalIndex       = LocalIndexHandler.Initialize(config);
            }
        }
Exemple #2
0
        public static LocalIndexHandler Initialize(CASCConfig config)
        {
            var handler = new LocalIndexHandler();

            var idxFiles = GetIdxFiles(config);

            if (idxFiles.Count == 0)
            {
                throw new FileNotFoundException("idx files missing!");
            }

            foreach (var idx in idxFiles)
            {
                handler.ParseIndex(idx);
            }

            return(handler);
        }