Surfaced from a Qodo /improve on the Python port of PR #167 (daqifi/daqifi-python-core PR #103, importance 6).
Bug
`CsvExporter.ExportAsync` early-returns when the source has no channels but doesn't call `progress.Report(100)`:
```csharp
var channels = source.GetChannels();
if (channels.Count == 0)
return; // <-- caller's progress bar stalls below 100%
```
Both successful export paths (`ExportAllSamplesAsync` and `ExportAveragedAsync`) call `progress?.Report(100)` before returning. The no-channels early-return is the one place that doesn't, so a caller wiring the progress callback to a UI element gets a bar stuck below 100% on no-op exports.
Fix (already shipped in Python port)
```csharp
var channels = source.GetChannels();
if (channels.Count == 0)
{
progress?.Report(100);
return;
}
```
Refs
Surfaced from a Qodo /improve on the Python port of PR #167 (daqifi/daqifi-python-core PR #103, importance 6).
Bug
`CsvExporter.ExportAsync` early-returns when the source has no channels but doesn't call `progress.Report(100)`:
```csharp
var channels = source.GetChannels();
if (channels.Count == 0)
return; // <-- caller's progress bar stalls below 100%
```
Both successful export paths (`ExportAllSamplesAsync` and `ExportAveragedAsync`) call `progress?.Report(100)` before returning. The no-channels early-return is the one place that doesn't, so a caller wiring the progress callback to a UI element gets a bar stuck below 100% on no-op exports.
Fix (already shipped in Python port)
```csharp
var channels = source.GetChannels();
if (channels.Count == 0)
{
progress?.Report(100);
return;
}
```
Refs