public void Execute() { var apps = AppRegistry.List(); var formatter = new TableFormatter <(string[] name, AppAnalyzer app)>( new ColumnDefinition <(string[] name, AppAnalyzer app)>("NAME", v => string.Join(", ", v.name)), new ColumnDefinition <(string[] name, AppAnalyzer app)>("VERSION", v => v.app.Version.ToString()), new ColumnDefinition <(string[] name, AppAnalyzer app)>("DESCRIPTION", v => v.app.Description) ); formatter.Print(apps, Console.Out); }
public void PreExecute() { var asms = _explicitAssemblies; if (asms == null) { asms = new List <Assembly>(); foreach (var f in Directory.EnumerateFiles(Environment.CurrentDirectory, "*.dll")) { try { asms.Add(Assembly.LoadFrom(f)); } catch (Exception e) { // dll does not seem to be an assembly } } } AppRegistry.Initialize(asms); }
public void PreExecute() { AppRegistry.Select(_appName); }