[성현모] CPMeta 라이브러리, 예제 추가
This commit is contained in:
46
Projects/NetStandard/PlayGround.NetFramework/Program.cs
Normal file
46
Projects/NetStandard/PlayGround.NetFramework/Program.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user