public override void Reset() { Id = 0; fileUrl = ""; filePath = ""; fileType = DownloadFileType.None; onScriptDownloaded = null; isSaved = false; }
public void Download(string url, string targetPath, DownloadFileType fileType, OnScriptDownloadFinishedEvent downloadedEvent = null, bool isSaved = false) { var file = new DownloadFileRequest(); file.Id = DateTime.Now.Millisecond; file.fileUrl = url; file.filePath = targetPath; file.fileType = fileType; file.onScriptDownloaded = downloadedEvent; file.isSaved = isSaved; _downloadFileList.Add(file); StartDownloadFile(); }
public void Download(string url, string targetPath, DownloadFileType fileType, OnScriptDownloadFinishedEvent downloadedEvent = null, bool isSaved = false) { var file = PoolManager.GetInstance().Get <DownloadFileRequest>("DownloadFileRequest"); file.Id = System.DateTime.Now.Millisecond; file.fileUrl = url; file.filePath = targetPath; file.fileType = fileType; file.onScriptDownloaded = downloadedEvent; file.isSaved = isSaved; _downloadFileList.Add(file); StartDownloadFile(); }