public DownloadHandle( string name, string downloadPath, ref FileHash hash, Loader.OnError onError, int retryCount, int timeoutSeconds, System.Action <int> onProgress, StorageCache storageCache, FileWriter fileWriter) { Debug.Assert(name != null); Debug.Assert(downloadPath != null); Debug.Assert(onError != null); Debug.Assert(storageCache != null); Debug.Assert(fileWriter != null); this.name = name; _onError = onError; _downloadPath = downloadPath; _hash = hash; _restRetryCount = retryCount; _timeoutSeconds = timeoutSeconds; _onProgress = onProgress; _storageCache = storageCache; _fileWriter = fileWriter; }
public FileHandle( string name, string storageCachePath, DownloadHandle downloadHandle, Loader.OnError onError, FileHandle[] dependencies) { Debug.Assert(name != null); Debug.Assert(storageCachePath != null); Debug.Assert(onError != null); this.name = name; _onError = onError; _storageCachePath = storageCachePath; this.downloadHandle = downloadHandle; this.dependencies = dependencies; if (dependencies != null) { for (int i = 0; i < dependencies.Length; i++) { dependencies[i].IncrementReference(); } } if (this.downloadHandle == null) { Start(); } else { this.downloadHandle.IncrementReference(); } }
public AssetHandle( FileHandle fileHandle, string name, string dictionaryKey, Type type, Loader.OnError onError) { Debug.Assert(fileHandle != null); Debug.Assert(name != null); Debug.Assert(dictionaryKey != null); Debug.Assert(onError != null); this.fileHandle = fileHandle; this.fileHandle.IncrementReference(); this.name = name; _type = type; this.dictionaryKey = dictionaryKey; _onError = onError; }
public FileHandle( string name, string storageCachePath, DownloadHandle downloadHandle, Loader.OnError onError) { Debug.Assert(name != null); Debug.Assert(storageCachePath != null); Debug.Assert(onError != null); this.name = name; _onError = onError; _storageCachePath = storageCachePath; this.downloadHandle = downloadHandle; if (this.downloadHandle == null) { Start(); } else { this.downloadHandle.IncrementReference(); } }