Exemple #1
0
 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;
 }
Exemple #3
0
 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;
 }
Exemple #4
0
 public RunCommand(CremaApplication application, ScriptContext scriptContext)
 {
     this.application   = application;
     this.scriptContext = scriptContext;
 }
Exemple #5
0
 public RunCommand(CremaApplication application, ScriptContext scriptContext)
 {
     this.application = application;
     // this.cremaHost = cremaHost;
     this.ScriptContext = scriptContext;
 }
Exemple #6
0
 public RunCommand(CremaApplication application)
     : base("run")
 {
     this.application = application;
 }