> For the complete documentation index, see [llms.txt](https://tldocs.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tldocs.gitbook.io/documentation/framework/controls/async-methods-with-progress-bar.md).

# Async methods with progress bar

Can be used in both WHO and BusinessObject. The property isIndeterminate is set as true when the number of steps is unknown or when a single step takes a long time.

```csharp
public async void Generate()
{
    if (ValidateGenerateInput() == false) return;

    var year = PromptForYear();
    if (year == null) return;

    using (var progress = new Progress(l.Translate("Generieren ..."), isIndeterminate: true))
    {
        var selectedDaysOfWeek = GetSelectedDaysOfWeek();
        await BusObj.Generate(year.Value, selectedDaysOfWeek);

        if (year != yearlyCalendarView.SelectedYear) return;

        RefreshDetailsForSelectedYear();
    }
}
```
