コード例 #1
0
        DownloadHelper CreateHelper(string trackId, Uri uri = null)
        {
            var helper = new DownloadHelper
            {
                TrackId = trackId,
                Uri     = uri
            };

            helper.StateChanged = (state) =>
            {
                RunPoller();
            };
            return(helper);
        }
コード例 #2
0
        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);
        }