Example #1
0
 private void download(BinTorrent bt)
 {
     var info = new BinRootInfo(binRepository.Root, bt);
     var m = torrentEnvironment.PrepareManager(info);
     m.TorrentStateChanged += onTorrentStateChanged;
     m.Start();
 }
Example #2
0
        public void Put(BinTorrent bt)
        {
            var targetPath = Path.Combine(Path.Combine(bt.Publisher, bt.Product), bt.Version);
            ensureDirectory(targetPath);

            using (var fs = File.OpenWrite(rootedPath(targetPath, "this.torrent")))
                bt.StoreTo(fs);
        }
Example #3
0
 public BinRootInfo(string basePath, BinTorrent torrent)
 {
     this.basePath = basePath;
     this.torrent = torrent;
     relativePath = torrent.Publisher + "\\" + torrent.Product + "\\" + torrent.Version;
 }