using Microsoft.Extensions.Logging; using Persistence.Client.Clients.Base; using Persistence.Client.Clients.Interfaces; using Persistence.Client.Clients.Interfaces.Refit; using Persistence.Models; namespace Persistence.Client.Clients; public class DataSourceSystemClient : BaseClient, IDataSourceSystemClient { private readonly IRefitDataSourceSystemClient dataSourceSystemClient; public DataSourceSystemClient(IRefitDataSourceSystemClient dataSourceSystemClient, ILogger logger) : base(logger) { this.dataSourceSystemClient = dataSourceSystemClient; } public async Task Add(DataSourceSystemDto dataSourceSystemDto, CancellationToken token) { await ExecutePostResponse( async () => await dataSourceSystemClient.Add(dataSourceSystemDto, token), token); } public async Task> Get(CancellationToken token) { var result = await ExecuteGetResponse>( async () => await dataSourceSystemClient.Get(token), token); return result; } public void Dispose() { dataSourceSystemClient.Dispose(); } }