SDownload.Framework.Streams.SCSetStream.Finish C# (CSharp) 메소드

Finish() 공개 메소드

Performs any post-download steps for all of the songs in the set
public Finish ( bool close = true ) : bool
close bool Not used
리턴 bool
        public override bool Finish(bool close = true)
        {
            var i = 1;
            // Attempt to finish each one, count any errors
            foreach (var download in _downloads.Keys)
            {
                View.Report(String.Format("Finalizing track {0}/{1}", i++, _downloads.Keys.Count));
                if (!download.Finish())
                    _failed++;
            }

            // Don't close the view, need to report errors after
            // Still want to clear debugging data though
            base.Finish(false);
            View.Report("Done!" + (_failed > 0 ? " Failed: " + _failed : ""), true);
            return true;
        }
    }