Last change
on this file since 17869 was
17039,
checked in by dpiringe, 6 years ago
|
#2924:
- removed a blank line in InspectCommand.cs
- removed BuildCommand.cs and project HeuristicLab.DefinitionLanguage, because it was only a test
- removed reference BuildCommand in ApplicationCommand
|
File size:
873 bytes
|
Line | |
---|
1 | using System.IO;
|
---|
2 | using System.Linq;
|
---|
3 | using HeuristicLab.CommandLineInterface;
|
---|
4 | using HeuristicLab.PluginInfrastructure;
|
---|
5 |
|
---|
6 | namespace HeuristicLab {
|
---|
7 | [Command(Description = "To inspect a .hl file.")]
|
---|
8 | class InspectCommand : ICommand {
|
---|
9 |
|
---|
10 | [Value(0)]
|
---|
11 | public string Input { get; set; }
|
---|
12 |
|
---|
13 | public void Execute() {
|
---|
14 | if (Input == null || !File.Exists(Input))
|
---|
15 | throw new FileNotFoundException("Path to .hl file empty or wrong!");
|
---|
16 |
|
---|
17 | if (Settings.Host != null) {
|
---|
18 | Settings.Host.QuietMode = false;
|
---|
19 | Settings.Host.Run(new ApplicationRunner() {
|
---|
20 | AssembliesToLoad = Settings.assemblyInfos,
|
---|
21 | StartApplication =
|
---|
22 | ApplicationManager.Manager.GetInstances<IApplication>(new UniPath(Input))
|
---|
23 | .Where(x => x.Name.Equals("CLIInspect"))
|
---|
24 | .First()
|
---|
25 | });
|
---|
26 | }
|
---|
27 | }
|
---|
28 | }
|
---|
29 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.