CommunityToolkit / CommunityToolkit/dotnet
Setting the default value for the parameter of ExecuteAsync(object? parameter) to equal null
- Dominant language
- C#
- Stars
- 3.8k
- Forks
- 400
- PR merge metrics
- No merged PRs in 30d
Description
### Overview
to set the parameter default value to null
````csharp
Task ExecuteAsync(object? parameter);
````
to not require setting null if there is no parameters
### API breakdown
````csharp
Task ExecuteAsync(object? parameter == null);
````
### Usage example
instead of setting null
````csharp
SaveCommand.ExecuteAsync(null);
````
you can use it like
````csharp
SaveCommand.ExecuteAsync();
````
### Breaking change?
I'm not sure
### Alternatives
you show set null if there is no parameters
````csharp
SaveCommand.ExecuteAsync(null);
````
### Additional context
_No response_
### Help us help you
Yes, but only if others can assist
Contributor guide
Assessment
This issue has not been assessed yet.