public TorrentViewModel(Torrent torrentModel, UTorrentClient client) { _torrentModel = torrentModel; //_client = client; _savePath = PathManager.GetTorrentPathForEpisode(_torrentModel.Episode); State = TorrentManager.CreateTorrentState(torrentModel); }
public void RemoveTorrent(Torrent torrent) { if (torrent.EntityState != EntityState.Detached) _databaseEntities.DeleteObject(torrent); }
/// <summary> /// Deprecated Method for adding a new object to the Torrents EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToTorrents(Torrent torrent) { base.AddObject("Torrents", torrent); }
/// <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; }