143 lines
6.6 KiB
C#
143 lines
6.6 KiB
C#
using CPMeta.Models;
|
|
using KeficoMailService;
|
|
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace PlayGround.NetFramework
|
|
{
|
|
internal class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
//html Send
|
|
Manager manager = new Manager();
|
|
|
|
Address from = new Address { AddressMail = "TraNotify@kefico.co.kr", AddressName = "" };
|
|
List<Address> to = new List<Address> { new Address { AddressMail = "systemx.kjh@systemx.co.kr", AddressName = "" } };
|
|
List<Address> cc = new List<Address> { new Address { AddressMail = "systemx.shm@systemx.co.kr", AddressName = "" } };
|
|
List<Address> bcc = new List<Address> { };
|
|
|
|
string subject = "TRA 테스트용 메일";
|
|
string textSend = manager.SendMailDetail(from, to, cc, bcc, subject, "Tra Notify", MailType.Text);
|
|
|
|
|
|
// string form = manager.GetFormHtml(new HtmlFormType { FormType="", SystemName="" });
|
|
|
|
//form = form.Replace("@HEADTITLE@", "헤드타이틀");
|
|
//form = form.Replace("@TITLE@", "타이틀");
|
|
//form = form.Replace("@BODY@", "내용");
|
|
//form = form.Replace("@URL@", "링크");
|
|
// string htmlSend = manager.SendMailDetail(from, to, cc, bcc, subject, form, MailType.Html);
|
|
|
|
|
|
//Text Send
|
|
|
|
|
|
// //global set
|
|
// string host = "192.168.0.42";
|
|
|
|
// //random value
|
|
// string ProductId = "00010032-87a4-45ca-b627-b975d41e35df";
|
|
// // string Mac1 = Guid.NewGuid().ToString();
|
|
//// string Mac2 = Guid.NewGuid().ToString();
|
|
|
|
// //Get
|
|
// Task.Run(async () =>
|
|
// {
|
|
// var res2 = await CPMeta.CPMeta.HealthCheck(host);
|
|
|
|
// // var res2 = await CPMeta.CPMeta.GetWbmsMetaByProductId(host, ProductId);
|
|
|
|
// Console.ForegroundColor = ConsoleColor.DarkBlue;
|
|
// Console.WriteLine($"Response: {res2} (Trace Guid:)");
|
|
// Console.ForegroundColor = ConsoleColor.White;
|
|
|
|
// // var res3 = await CPMeta.CPMeta.GetWbmsMetaByMacAddress(host, Mac1);
|
|
// // var res4 = await CPMeta.CPMeta.GetWbmsMetaByMacAddress(host, Mac2);
|
|
// }).Wait();
|
|
|
|
|
|
return;
|
|
////global set
|
|
//string host = "192.168.0.43";
|
|
|
|
//Task.Run(async () =>
|
|
//{
|
|
// //1. ecuid
|
|
// var resEcuid = await KmsProxy.KmsProxy.EcuID_SupplierEcuID(host, new KmsProxy.Models.EcuID.Request_SupplierEcuID
|
|
// {
|
|
// EcuID = ""
|
|
// });
|
|
// Console.WriteLine(JsonConvert.SerializeObject(resEcuid, Formatting.Indented));
|
|
|
|
// //2. master ecu key
|
|
// var resMasterKeyProvisioning = await KmsProxy.KmsProxy.MasterEcuKey_SupplierKeyProvisioning(host, new KmsProxy.Models.MasterEcuKey.Request_SupplierKeyProvisioning
|
|
// {
|
|
// EcuID=""
|
|
// });
|
|
// Console.WriteLine(JsonConvert.SerializeObject(resMasterKeyProvisioning, Formatting.Indented));
|
|
|
|
// var resMasterKeyProvisioningResult = await KmsProxy.KmsProxy.MasterEcuKey_SupplierKeyProvisioningResult(host, new KmsProxy.Models.MasterEcuKey.Request_SupplierKeyProvisioning_Result
|
|
// {
|
|
// EcuID=""
|
|
// });
|
|
// Console.WriteLine(JsonConvert.SerializeObject(resMasterKeyProvisioningResult, Formatting.Indented));
|
|
|
|
// //3. SupplierSymmKey
|
|
// var symmKeyProvisioning = await KmsProxy.KmsProxy.SupplierSymmKey_SupplierKeyProvisioning(host, new KmsProxy.Models.SupplierSymmKey.Request_SupplierKeyProvisioning
|
|
// {
|
|
// EcuID=""
|
|
// });
|
|
// Console.WriteLine(JsonConvert.SerializeObject(symmKeyProvisioning, Formatting.Indented));
|
|
|
|
// var symmKeyProvisioningResult = await KmsProxy.KmsProxy.SupplierSymmKey_SupplierKeyProvisioningResult(host, new KmsProxy.Models.SupplierSymmKey.Request_SupplierKeyProvisioning_Result
|
|
// {
|
|
// EcuID=""
|
|
// });
|
|
// Console.WriteLine(JsonConvert.SerializeObject(symmKeyProvisioningResult, Formatting.Indented));
|
|
|
|
// var symmKeySync = await KmsProxy.KmsProxy.SupplierSymmKey_SupplierKeySyncValue(host, new KmsProxy.Models.SupplierSymmKey.Request_SupplierKeySyncValue
|
|
// {
|
|
// EcuID=""
|
|
// });
|
|
// Console.WriteLine(JsonConvert.SerializeObject(symmKeySync, Formatting.Indented));
|
|
|
|
// var symmKeySyncResult = await KmsProxy.KmsProxy.SupplierSymmKey_SupplierKeySyncValueResult(host, new KmsProxy.Models.SupplierSymmKey.Request_SupplierKeySyncValue_Result
|
|
// {
|
|
// EcuID=""
|
|
// });
|
|
// Console.WriteLine(JsonConvert.SerializeObject(symmKeySyncResult, Formatting.Indented));
|
|
|
|
// //4. SecOCKey
|
|
// var secOcKeyProvisioning = await KmsProxy.KmsProxy.SecOCKey_SupplierKeyProvisioning(host, new KmsProxy.Models.SecOCKey.Request_SupplierKeyProvisioning
|
|
// {
|
|
// EcuID=""
|
|
// });
|
|
// Console.WriteLine(JsonConvert.SerializeObject(secOcKeyProvisioning, Formatting.Indented));
|
|
|
|
// var secOcKeyProvisioningResult = await KmsProxy.KmsProxy.SecOCKey_SupplierKeyProvisioningResult(host, new KmsProxy.Models.SecOCKey.Request_SupplierKeyProvisioning_Result
|
|
// {
|
|
// EcuID=""
|
|
// });
|
|
// Console.WriteLine(JsonConvert.SerializeObject(secOcKeyProvisioningResult, Formatting.Indented));
|
|
|
|
// var secOcKeySync = await KmsProxy.KmsProxy.SecOCKey_SupplierKeySyncValue(host, new KmsProxy.Models.SecOCKey.Request_SupplierKeySyncValue
|
|
// {
|
|
// EcuID=""
|
|
// });
|
|
// Console.WriteLine(JsonConvert.SerializeObject(secOcKeySync, Formatting.Indented));
|
|
|
|
// var secOcKeySyncResult = await KmsProxy.KmsProxy.SecOCKey_SupplierKeySyncValueResult(host, new KmsProxy.Models.SecOCKey.Request_SupplierKeySyncValue_Result
|
|
// {
|
|
// EcuID=""
|
|
// });
|
|
// Console.WriteLine(JsonConvert.SerializeObject(secOcKeySyncResult, Formatting.Indented));
|
|
|
|
|
|
// }).Wait();
|
|
}
|
|
}
|
|
}
|