[성현모] CPMeta 라이브러리, 예제 추가

This commit is contained in:
SHM
2025-10-31 11:49:13 +09:00
parent b78e5a23ea
commit 3d5e790057
12 changed files with 378 additions and 0 deletions

View File

@ -0,0 +1,46 @@
using CPMeta;
using CPMeta.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PlayGround.NetFramework
{
internal class Program
{
static void Main(string[] args)
{
//CpMetaSet
CPMeta.CPMeta.Port = 9000;
string ProductId = Guid.NewGuid().ToString();
string Mac1 = Guid.NewGuid().ToString();
string Mac2 = Guid.NewGuid().ToString();
//Set
Task.Run(async() =>
{
Request_SetWbmsMeta req = new Request_SetWbmsMeta();
req.ProductID = ProductId;
req.MacAddress1 = Mac1;
req.MacAddress2 = Mac2;
var res = await CPMeta.CPMeta.SetWbmsMetaAsync("127.0.0.1", req);
}).Wait();
//Get
Task.Run(async() =>
{
var rese2 = await CPMeta.CPMeta.GetWbmsMetaByProductId("127.0.0.1", ProductId);
var rese3 = await CPMeta.CPMeta.GetWbmsMetaByMacAddress("127.0.0.1", Mac1);
var rese4 = await CPMeta.CPMeta.GetWbmsMetaByMacAddress("127.0.0.1", Mac2);
int b = 0;
}).Wait();;
int a = 0;
}
}
}