DownloadHelper CreateHelper(string trackId, Uri uri = null) { var helper = new DownloadHelper { TrackId = trackId, Uri = uri }; helper.StateChanged = (state) => { RunPoller(); }; return(helper); }
DownloadHelper CreateHelper(string trackId, Uri uri = null) { var helper = new DownloadHelper { TrackId = trackId, Uri = uri }; helper.StateChanged = (state) => { if (state == DownloadHelper.DownloadState.Completed) { TempFileManager.Shared.Add(helper.TrackId, helper.FilePath); } RunPoller(); }; return(helper); }