29 lines
677 B
C#
29 lines
677 B
C#
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Hcs.ClientApi.NsiApi
|
|
{
|
|
public class HcsNsiApi
|
|
{
|
|
public HcsClientConfig Config { get; private set; }
|
|
|
|
public HcsNsiApi(HcsClientConfig config)
|
|
{
|
|
Config = config;
|
|
}
|
|
|
|
public async Task<object[]> GetNsiItem(int regNum, CancellationToken token = default)
|
|
{
|
|
try
|
|
{
|
|
var method = new HcsMethodExportNsi(Config);
|
|
return await method.GetNsiItem(regNum, token);
|
|
}
|
|
catch (HcsNoResultsRemoteException)
|
|
{
|
|
return [];
|
|
}
|
|
}
|
|
}
|
|
}
|