Bug Description
Several methods returning Task<T> do not follow the established Async suffix convention used elsewhere in the codebase. The same project uses SearchDomainServicesAsync, GetByNameAsync, UpdateAsync — but similar async methods omit the suffix.
Actual Behavior
// IServiceManager.cs lines 24-54
Task<bool> InstallService(...);
Task<bool> UninstallService(...);
Task<bool> StartService(...);
Task<bool> StopService(...);
Task<bool> RestartService(...);
// IServiceRepository.cs line 106
Task<IEnumerable<ServiceDto>> Search(...);
Meanwhile, the same interface uses:
// IServiceRepository.cs line 207
Task<IEnumerable<Service>> SearchDomainServicesAsync(...);
Additionally, async void is used in the UI layer instead of async Task:
// ServiceCommands.cs
public async void StartService(...)
public async void StopService(...)
public async void RestartService(...)
The async void pattern is particularly problematic — exceptions cannot be caught or awaited by callers.
Expected Behavior
All Task<T>-returning methods should consistently use the Async suffix, matching the pattern already established in the repository layer. UI event handlers using async void should be reviewed for proper exception handling.
Environment
- Files:
src/Servy.Core/Services/IServiceManager.cs, src/Servy.Core/Data/IServiceRepository.cs, src/Servy/Services/ServiceCommands.cs
- Lines: IServiceManager 24-54, IServiceRepository 106, ServiceCommands StartService/StopService/RestartService
Bug Description
Several methods returning
Task<T>do not follow the establishedAsyncsuffix convention used elsewhere in the codebase. The same project usesSearchDomainServicesAsync,GetByNameAsync,UpdateAsync— but similar async methods omit the suffix.Actual Behavior
Meanwhile, the same interface uses:
Additionally,
async voidis used in the UI layer instead ofasync Task:The
async voidpattern is particularly problematic — exceptions cannot be caught or awaited by callers.Expected Behavior
All
Task<T>-returning methods should consistently use theAsyncsuffix, matching the pattern already established in the repository layer. UI event handlers usingasync voidshould be reviewed for proper exception handling.Environment
src/Servy.Core/Services/IServiceManager.cs,src/Servy.Core/Data/IServiceRepository.cs,src/Servy/Services/ServiceCommands.cs