diff --git a/README.md b/README.md index e9c59c8..3063f50 100644 --- a/README.md +++ b/README.md @@ -129,20 +129,20 @@ public class MyViewModel : ViewModelBase ``` In this example, if the `Counter` property hasn’t been set before, the Get(10) will return 10 as the default value. -### Asynchronous FluentCommand (`AsyncCommand`) -The AsyncCommand in the MVVMFluent library is designed to simplify asynchronous command execution with built-in support for cancellation, progress reporting, and exception handling. It allows you to execute long-running tasks without blocking the UI thread, while maintaining full control over the command's lifecycle. +### Asynchronous FluentCommand (`AsyncFluentCommand`) +The AsyncFluentCommand in the MVVMFluent library is designed to simplify asynchronous command execution with built-in support for cancellation, progress reporting, and exception handling. It allows you to execute long-running tasks without blocking the UI thread, while maintaining full control over the command's lifecycle. **Key Features:** - **Cancellation Support:** The `CancelCommand` property allows users to stop an ongoing asynchronous operation, making it ideal for tasks that may take a significant amount of time or need to be interrupted. - **Execution State Tracking:** The command exposes an `IsRunning` property to indicate whether the command is currently executing, which can be bound to UI elements like progress bars or buttons to reflect the task status dynamically. - **Progress Reporting:** The `Progress` property enables reporting task completion status, which can be updated via the ReportProgress method. This is especially useful when performing iterative tasks or tasks with multiple stages. -- **Fluent Configuration:** Similar to the rest of the MVVMFluent library, the `AsyncCommand` can be configured fluently, allowing you to chain conditions (`If()`), exception handling (`Handle()`), and cancellation logic seamlessly. +- **Fluent Configuration:** Similar to the rest of the MVVMFluent library, the `AsyncFluentCommand` can be configured fluently, allowing you to chain conditions (`If()`), exception handling (`Handle()`), and cancellation logic seamlessly. Example Usage In your view model: ```csharp -public AsyncCommand LoadCommand => +public AsyncFluentCommand LoadCommand => Do(LoadData) .If(() => CanLoad) .Handle(ex => HandleError(ex)); @@ -173,10 +173,10 @@ In XAML: