reactiveui / ReactiveUI.SourceGenerators

Use source generators to generate objects.
MIT License
31 stars 3 forks source link

Strip `Async` suffix from Generated Commands #78

Closed michaelstonis closed 1 month ago

michaelstonis commented 1 month ago

Describe the solution you'd like When using the ReactiveCommand attribute, it would be nice if the generated command stripped out the Async suffix from the command name when using methods that end with Async.

For example.

[ReactiveCommand]
private Task InitializeAsync()
{
    ...
}

Currently, this would result in a command named InitializeAsyncCommand. The desired functionality would be to have a command named InitializeCommand generated.

The MVVM Toolkit does something similar with this implementation.

Describe alternatives you've considered The workaround right now is to just omit the Async suffix on methods that return tasks. This can vary from team to team as to whether they add this suffix.

ChrisPulman commented 1 month ago

Thank you Michael, this has been added.

github-actions[bot] commented 4 weeks ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.