public TorrentAdapter(Torrent torrent, ObjectPath path) { this.path = path; this.torrent = torrent; this.filesPath = path.ToString() + "/files/{0}"; files = new ObjectPath[torrent.Files.Length]; for (int i = 0; i < files.Length; i++) { ObjectPath p = new ObjectPath(string.Format(filesPath, i)); TorrentFileAdapter adapter = new TorrentFileAdapter(torrent.Files[i], p); files[i] = p; TorrentService.Bus.Register(p, adapter); } }
public TorrentAdapter(Torrent torrent, ObjectPath path) { this.path = path; this.torrent = torrent; this.filesPath = path.ToString () + "/files/{0}"; files = new ObjectPath[torrent.Files.Length]; for (int i=0; i < files.Length; i++) { ObjectPath p = new ObjectPath (string.Format(filesPath, i)); TorrentFileAdapter adapter = new TorrentFileAdapter (torrent.Files[i], p); files[i] = p; TorrentService.Bus.Register (p, adapter); } }