25 lines
787 B
C#
25 lines
787 B
C#
using Hcs.Broker.Api.Request.Exception;
|
|
using Hcs.Broker.Api.Request.Nsi;
|
|
using Hcs.Service.Async.Nsi;
|
|
|
|
namespace Hcs.Broker.Api
|
|
{
|
|
/// <inheritdoc cref="INsiApi"/>
|
|
public class NsiApi(Client client) : ApiBase(client), INsiApi
|
|
{
|
|
/// <inheritdoc cref="INsiApi"/>
|
|
public async Task<IEnumerable<NsiItemType>> ExportDataProviderNsiItemAsync(exportDataProviderNsiItemRequestRegistryNumber registryNumber, CancellationToken token = default)
|
|
{
|
|
try
|
|
{
|
|
var request = new ExportDataProviderNsiItemRequest(client);
|
|
return await request.ExecuteAsync(registryNumber, token);
|
|
}
|
|
catch (NoResultsRemoteException)
|
|
{
|
|
return [];
|
|
}
|
|
}
|
|
}
|
|
}
|