Add export from nsi-common service
This commit is contained in:
19
Hcs.TestApp/ClientDemo/NsiCommonDemo.cs
Normal file
19
Hcs.TestApp/ClientDemo/NsiCommonDemo.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using Hcs.ClientApi;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Hcs.ClientDemo
|
||||
{
|
||||
public class NsiCommonDemo
|
||||
{
|
||||
public static void DemoExportNsiItem2(HcsClient client)
|
||||
{
|
||||
var result = client.NsiCommon.GetNsiItem(2).Result;
|
||||
var json = JsonConvert.SerializeObject(result);
|
||||
Clipboard.SetText(json);
|
||||
|
||||
Console.WriteLine($"Результат скопирован в буфер обмена!\r\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -68,7 +68,9 @@ namespace Hcs.ClientDemo
|
||||
if (false) FileStoreDemo.DemoGetFileLength(client);
|
||||
if (false) FileStoreDemo.DemoGostHash(client);
|
||||
|
||||
if (true) NsiDemo.DemoExportNsiItem51(client);
|
||||
if (false) NsiDemo.DemoExportNsiItem51(client);
|
||||
|
||||
if (true) NsiCommonDemo.DemoExportNsiItem2(client);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user