-
Notifications
You must be signed in to change notification settings - Fork 459
Add BaseCommand.ChangeCanExecute() #736
Add BaseCommand.ChangeCanExecute() #736
Conversation
Based on community feedback xamarin#709 (comment)
This encourages developers to use RaiseCanExecuteChanged to avoid maintaing and documenting two methods that perform the same functionality
Assigning to @jfversluis for review since he was looped into the original discussion: #709 (comment) |
src/CommunityToolkit/Xamarin.CommunityToolkit/ObjectModel/BaseCommand.shared.cs
Show resolved
Hide resolved
@brminnick since this PR makes an API Obsolete I think that is an API change, so will be better to target the |
@pictos It doesn't make an API obsolete. It adds an API, improving the migration experience from Users of This PR adds I originally attributed As a compromise to not adding |
@brminnick my mistake so, thanks for explaining that. Yeah, I would say that we are good to go then. |
Changed [Obsolete]
to [EditorBrowsable]
This PR is base on community feedback from @maxkoshevoi: #709 (comment)
Description of Change
Because Xamarin.Forms.Command uses
ChangeCanExecute()
, addingChangeCanExecute()
to bothAsyncCommand
andAsyncValueCommand
enables an easier, more seamless, transition fromXamarin.Forms.Command
toXamarin.CommunityToolkit.ObjectModel.AsyncCommand
.API Changes
Adds
BaseCommand.ChangeCanExecute()
BaseCommand.ChangeCanExecute()
leveragesBaseCommand.RaiseCanExecuteChanged()
Behavioral Changes
None,
BaseCommand.ChangeCanExecute()
leveragesBaseCommand.RaiseCanExecuteChanged()
:PR Checklist