public ConsoleCommandContext(ICremaHost cremaHost, CremaApplication application, [ImportMany] IEnumerable <IConsoleDrive> rootItems, [ImportMany] IEnumerable <IConsoleCommand> commands) : base(rootItems, commands) { this.cremaHost = cremaHost; this.application = application; this.BaseDirectory = application.DocumentsPath; this.Dispatcher = application.Dispatcher; }
public ConsoleCommandContext(ICremaHost cremaHost, CremaApplication application, [ImportMany] IEnumerable <IConsoleDrive> driveItems, [ImportMany] IEnumerable <IConsoleCommand> commands) : base(driveItems, commands) { this.cremaHost = cremaHost; this.application = application; this.BaseDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); this.Dispatcher = application.Dispatcher; }
public ConsoleTerminal(ICremaHost cremaHost, CremaApplication application, ConsoleCommandContext commandContext, ConsoleTerminalCancellation cancellation) : base(commandContext) { this.cremaHost = cremaHost; this.cremaHost.Opened += (s, e) => this.IsEnabled = true; this.cremaHost.Closing += (s, e) => this.IsEnabled = false; this.application = application; this.application.Closed += Application_Closed; this.cancellation = cancellation; }
public RunCommand(CremaApplication application, ScriptContext scriptContext) { this.application = application; this.scriptContext = scriptContext; }
public RunCommand(CremaApplication application, ScriptContext scriptContext) { this.application = application; // this.cremaHost = cremaHost; this.ScriptContext = scriptContext; }
public RunCommand(CremaApplication application) : base("run") { this.application = application; }