Skip to content

Commit 1698233

Browse files
committed
Generate ConsoleAppBuilder template code without Run/RunAsync
1 parent 3f1b36d commit 1698233

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

ReadMe.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,8 +1492,6 @@ app.Add("foo", (int x, int y) => { });
14921492

14931493
// get cli-schema as objects
14941494
CommandHelpDefinition[] schema = app.GetCliSchema();
1495-
1496-
app.Run(args); // needs geenerate trigger of ConsoleAppFramework.
14971495
```
14981496

14991497
`CommandHelpDefinition` is the same one used internally for help output.

src/ConsoleAppFramework/ConsoleAppGenerator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ static void EmitConsoleAppBuilder(SourceProductionContext sourceProductionContex
259259
return;
260260
}
261261

262-
if (!hasRun && !hasRunAsync) return;
262+
// need to generate template codes
263+
// if (!hasRun && !hasRunAsync) return;
263264

264265
var sb = new SourceBuilder(0);
265266
sb.AppendLine(ConsoleAppBaseCode.GeneratedCodeHeader);

0 commit comments

Comments
 (0)