Пример #1
0
        /// <summary>
        /// ロード処理
        /// </summary>
        public ILoadProcess LoadFile(string identifier)
        {
            var data = LoadDatabase.GetBundleData(identifier);

            if (data == null)
            {
                OnError(ChipstarResult.ClientError($"Target Bundle Data is Not Found. == {identifier}"));
                return(SkipLoadProcess.Create(identifier));
            }
            if (data.IsOnMemory)
            {
                //	ロードしてあるならしない
                ChipstarLog.Log_Skip_OnMemory(data.Identifier);
                return(SkipLoadProcess.Create(identifier));
            }
            //	ローカルファイルを開く
            return(CreateLocalFileOpenJob(data));
        }
Пример #2
0
        /// <summary>
        /// ダウンロード処理
        /// </summary>
        public ILoadProcess CacheOrDownload(string identifier)
        {
            var data = LoadDatabase.GetBundleData(identifier);

            if (data == null)
            {
                OnError(ChipstarResult.ClientError($"Target Bundle Data is Not Found. == {identifier}"));
                return(SkipLoadProcess.Create(identifier));
            }
            if (data.IsOnMemory)
            {
                //	ロード済みは無視
                ChipstarLog.Log_Skip_OnMemory(data.Identifier);
                return(SkipLoadProcess.Create(data.Identifier));
            }
            if (StorageDatabase.HasStorage(data))
            {
                //	キャッシュ済は無視
                ChipstarLog.Log_Cached(data);
                return(SkipLoadProcess.Create(data.Identifier));
            }
            return(CreateDowloadJob(data.Url, data));
        }
Пример #3
0
 /// <summary>
 /// 初期化処理
 /// </summary>
 public void Init( )
 {
     ChipstarLog.Log_Downloader_StartInit();
     LoadDatabase.Clear();
 }
Пример #4
0
        public bool IsProcessing(string name)
        {
            var bundle = LoadDatabase.GetBundleData(name);

            return(JobEngine.HasRequest(bundle.Identifier));
        }