Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for IsExecuting to Reactive Commands #280

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

michaelstonis
Copy link
Contributor

@michaelstonis michaelstonis commented Dec 6, 2024

  • Adds a new ReactiveProperty<bool> IsExecuting to ReactiveCommand implementations. This is helpful to know when the execute or convert logic portion of a command is running.
    I originally implemented the execution count modification using Interlocked methods and then updating the IsExecuting property, but it seemed like it would be less error-prone to just update the counts and the IsExecuting in a singular lock statement.
  • Added the ability to provide state variables to SelectAwait and SubscribeAwait.
    • These were needed to help avoid capturing the HandleAsyncExecution methods in a closure.
  • Updated the MAUI project. It was broken before, but I made some updates to it and it was able to run without issue on macOS.

- Introduced new overloads of `SubscribeAwait` to accept a state parameter
- Updated existing async operators to handle state
- Introduced `IsExecuting` property to track command execution state.
- Added `executionCount` field for managing concurrent executions.
- Updated synchronous and asynchronous execution methods to handle the new execution logic.
- Ensured proper disposal of resources related to command execution.
- Introduced a new overload for SelectAwait that includes a state parameter.
- Added multiple classes to handle different AwaitOperation types with the new TState feature.
- Implemented error handling and completion logic in the new classes.
- Enhanced concurrency control with maxConcurrent option for parallel operations.
- Added support for being notified when IsExecuting has been changed
- Updated subscription logic for command execution.
- Improved async handling in subscription methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant