Exemplo n.º 1
0
 public TorrentViewModel(Torrent torrentModel, UTorrentClient client)
 {
     _torrentModel = torrentModel;
     //_client = client;
     _savePath = PathManager.GetTorrentPathForEpisode(_torrentModel.Episode);
     State = TorrentManager.CreateTorrentState(torrentModel);
 }
Exemplo n.º 2
0
 public void RemoveTorrent(Torrent torrent)
 {
     if (torrent.EntityState != EntityState.Detached)
     _databaseEntities.DeleteObject(torrent);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Torrents EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTorrents(Torrent torrent)
 {
     base.AddObject("Torrents", torrent);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Create a new Torrent object.
 /// </summary>
 /// <param name="torrentId">Initial value of the TorrentId property.</param>
 /// <param name="title">Initial value of the Title property.</param>
 /// <param name="episodeId">Initial value of the EpisodeId property.</param>
 public static Torrent CreateTorrent(global::System.Int64 torrentId, global::System.String title, global::System.Int64 episodeId)
 {
     Torrent torrent = new Torrent();
     torrent.TorrentId = torrentId;
     torrent.Title = title;
     torrent.EpisodeId = episodeId;
     return torrent;
 }