Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public void PreExecute()
 {
     AppRegistry.Select(_appName);
 }