public void TestLocate1()
        {
            string sourceFolder = @"I:\[BDMV][アニメ] ココロコネクト";
            string torrentPath  = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TestTorrents", "[U2].13680.torrent");

            IList <FileSystemFileInfo> fileInfos = GetFileSystemInfos(sourceFolder);
            var torrent = Torrent.Load(torrentPath);
            var locater = new TorrentFileLocater(torrent, fileInfos);

            var result = locater.Locate();
        }
Beispiel #2
0
        private LocateResult Locate()
        {
            this._fileSystemFileInfos = FileSystemFileSearcher.SearchFolder(this._sourceFolder);
            var locater = new TorrentFileLocater(this._torrent, this._fileSystemFileInfos,
                                                 () => this.Set(() => this.CurPorcess, ref this._curProcess, this._curProcess + 1));

            this.Set(() => this.MaxProcess, ref this._maxProcess, this._torrent.Files.Length);
            this.Set(() => this.CurPorcess, ref this._curProcess, 0);
            LocateResult result = locater.Locate();

            return(result);
        }