3
using System.Collections.Generic;
10
namespace Transmission {
12
public class TorrentOperateAction: Act {
14
public override string Name {
15
get { return AddinManager.CurrentLocalizer.GetString ("Operate on files"); }
18
public override string Description {
19
get { return AddinManager.CurrentLocalizer.GetString ("Operate on downloaded file"); }
22
public override string Icon {
23
get { return "file"; }
26
public override IEnumerable<Type> SupportedItemTypes {
27
get { yield return typeof (ITorrentEntry); }
30
public override IEnumerable<Item> Perform(IEnumerable<Item> items, IEnumerable<Item> modItems) {
31
foreach (Item item in items) {
32
ITorrentEntry entry = (ITorrentEntry)item;
33
yield return Services.UniverseFactory.NewFileItem(entry.Path) as Item;