dotmake-build / command-line

Declarative syntax for System.CommandLine via attributes for easy, fast, strongly-typed (no reflection) usage. Includes a source generator which automagically converts your classes to CLI commands and properties to CLI options or CLI arguments.
https://dotmake.build
MIT License
81 stars 6 forks source link

Add support for tasks without the async keyword #16

Closed QianMoXi closed 8 months ago

QianMoXi commented 8 months ago

If RunAsync method lacks the "async" keyword, the IsAsync property of IMethodSymbol will return false, which will result in incorrect generated code.

    public Task RunAsync()
    {
        return Task.Delay(1000);
    }