public static void ExecuteFromArgs(string[] args, Assembly opearationsAssembly, Options?options = null) { options = options ?? Options.Default; opearationsAssembly = opearationsAssembly ?? throw new ArgumentNullException(nameof(opearationsAssembly)); args = args ?? throw new ArgumentNullException(nameof(args)); IOperation[]? operations = null; try { operations = BuildOperations(args, opearationsAssembly, options); if (operations.Length == 0) { throw new NoOperationsException(); } } catch (Exception ex) { string helpText = HelpTextBuilder.BuildHelpText(opearationsAssembly, ex); throw new CommandParsingException(helpText, ex); } ExecuteOperations(operations ?? new IOperation[0]); }
public void DoesPrintHelp() { Type type = typeof(OperationWithBaseClass2); string helpText = HelpTextBuilder.BuildHelpText(type.Assembly); }
public void DoesPrintHelp() { Type type = typeof(OperationWithSimpleProps); string helpText = HelpTextBuilder.BuildHelpText(type.Assembly); }