Пример #1
0
 private void ExecuteApp(string className, string[] input)
 {
     try {
         var feature = ProgramStorageQueries.GetFeatureInfo(ClassesCommandFeaturesName.AppsList);
         (ProgramStorageQueries.GetInfoValue(feature, className) as CommandLineApplication).Execute(input);
     } catch (Exception e) {
         CMD.ShowApplicationMessageToUser($"message : {e.Message}\nroute : {this.ToString()}", showType: ShowType.DANGER);
     }
 }
Пример #2
0
        public void CallConventions()
        {
            var apps = ProgramStorageQueries.GetFeatureInfo(ClassesCommandFeaturesName.AppsList).Select(item => item.Item2);

            foreach (var app in apps)
            {
                (app as CommandLineApplication).HelpOption(inherited: true);
                (app as CommandLineApplication).Conventions
                .AddConvention(new MethodsAsSubcommandsConventions())
                .SetAppNameFromEntryAssembly();
            }
        }