Add CancellationToken support to all API client methods
All API client interfaces and implementations now accept an optional CancellationToken parameter for each method. This enables consumers to cancel HTTP requests, improving responsiveness and resource management. No changes were made to core logic or return types; only method signatures and HttpClient calls were updated to support cancellation.
This commit is contained in:
@@ -4,9 +4,9 @@ namespace DbFirst.BlazorWebApp.Services
|
||||
{
|
||||
public interface IMassDataApiClient
|
||||
{
|
||||
Task<int> GetCountAsync();
|
||||
Task<List<MassDataReadDto>> GetAllAsync(int? skip, int? take);
|
||||
Task<ApiResult<MassDataReadDto?>> UpsertAsync(MassDataWriteDto dto);
|
||||
Task<MassDataReadDto?> GetByCustomerNameAsync(string customerName);
|
||||
Task<int> GetCountAsync(CancellationToken ct = default);
|
||||
Task<List<MassDataReadDto>> GetAllAsync(int? skip, int? take, CancellationToken ct = default);
|
||||
Task<ApiResult<MassDataReadDto?>> UpsertAsync(MassDataWriteDto dto, CancellationToken ct = default);
|
||||
Task<MassDataReadDto?> GetByCustomerNameAsync(string customerName, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user