/// <summary> /// Initializes a new instance of the <see cref="CommandsNode"/> class. /// </summary> /// <param name="vfs">The Orchard VFS instance which the node belongs to.</param> /// <param name="commandAgent">The command agent instance.</param> public CommandsNode(IPowerShellVfs vfs, ICommandAgent commandAgent) : base(vfs, "Commands") { this.commandAgent = commandAgent; this.Item = new CollectionItem(this) { Name = "Commands", Description = "Contains all legacy Orchard commands available in the current tenant." }; }
public Notifyer(IEventHub eventHub, ICommandAgent commandAgent) { var asmName = Assembly.GetExecutingAssembly().GetName().Name; var iconStream = GetType().Assembly.GetManifestResourceStream(asmName + ".Resources.GitBitch.ico"); if (iconStream != null) { _notifyIcon.Icon = new Icon(iconStream); } eventHub.StartTalkingEvent += StartTalkingEvent; commandAgent.CommandRegisteredEvent += CommandRegisteredEvent; _notifyIcon.ContextMenu = new ContextMenu(new[] { new MenuItem("Open", OpenEventHandler), new MenuItem("Settings", SettingsEventHandler), new MenuItem("Exit", ExitEventHandler) }); }
public VisitorsController(ICommandAgent commandAgent, IListFactory <Visitor> visitorListFactory) { this.commandAgent = commandAgent; this.visitorListFactory = visitorListFactory; }
public VisitorsController(ICommandAgent commandAgent, IListFactory<Visitor> visitorListFactory) { this.commandAgent = commandAgent; this.visitorListFactory = visitorListFactory; }
/// <summary> /// Provides a one-time, preprocessing functionality for the cmdlet. /// </summary> protected override void BeginProcessing() { base.BeginProcessing(); this.commandAgent = this.AgentManager.GetAgent<ICommandAgent>(); }
/// <summary> /// Provides a one-time, preprocessing functionality for the cmdlet. /// </summary> protected override void BeginProcessing() { base.BeginProcessing(); this.commandAgent = this.AgentManager.GetAgent <ICommandAgent>(); }
public void CompileAndSendCommand(ICommandAgent commandAgent) { commandAgent.SendCommand(this); }
public HelpCommand(ISettingAgent settingAgent, ITalkAgent talkAgent, ICommandAgent commandAgent) : base(settingAgent, "Help", new[] { "help" }) { _talkAgent = talkAgent; _commandAgent = commandAgent; }