Add field type conversion

This commit is contained in:
2025-08-14 12:23:01 +09:00
parent c6c1b31575
commit aec09fdbe0
6 changed files with 38 additions and 37 deletions

View File

@ -1,5 +1,7 @@
using Hcs.ClientApi;
using Newtonsoft.Json;
using System;
using System.Windows.Forms;
namespace Hcs.ClientDemo
{
@ -8,11 +10,10 @@ namespace Hcs.ClientDemo
public static void DemoExportNsiItem51(HcsClient client)
{
var result = client.Nsi.GetNsiItem(51).Result;
Console.WriteLine($"Результат операции:\r\n");
foreach (var obj in result)
{
Console.WriteLine(obj.ToJSON());
}
var json = JsonConvert.SerializeObject(result);
Clipboard.SetText(json);
Console.WriteLine($"Результат скопирован в буфер обмена!\r\n");
}
}
}

View File

@ -65,6 +65,7 @@
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="ClientDemo\DebtRequestsDemo.cs" />