use the premade json for TaskData
This commit is contained in:
parent
1930b527db
commit
c09b6daadc
|
@ -199,11 +199,11 @@ namespace AscNet.GameServer.Handlers
|
|||
};
|
||||
session.SendPush(notifySocialData);
|
||||
|
||||
// NotifyTaskData notifyTaskData = JsonConvert.DeserializeObject<NotifyTaskData>(File.ReadAllText("Data/NotifyTaskData.json"))!;
|
||||
NotifyTaskData notifyTaskData = new()
|
||||
{
|
||||
TaskData = { }
|
||||
};
|
||||
NotifyTaskData notifyTaskData = JsonConvert.DeserializeObject<NotifyTaskData>(File.ReadAllText("Data/NotifyTaskData.json"))!;
|
||||
//NotifyTaskData notifyTaskData = new()
|
||||
//{
|
||||
// TaskData = { }
|
||||
//};
|
||||
session.SendPush(notifyTaskData);
|
||||
|
||||
NotifyActivenessStatus notifyActivenessStatus = new()
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
using AscNet.Common.MsgPack;
|
||||
using System.Text.Json;
|
||||
using Newtonsoft.Json;
|
||||
using System.Reflection;
|
||||
using AscNet.GameServer;
|
||||
using MessagePack;
|
||||
using static AscNet.GameServer.Packet;
|
||||
|
||||
namespace AscNet.Test
|
||||
{
|
||||
|
@ -12,14 +8,14 @@ namespace AscNet.Test
|
|||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string lines = File.ReadAllText("Data/NotifyLogin.json");
|
||||
NotifyLogin notifyLogin = System.Text.Json.JsonSerializer.Deserialize<NotifyLogin>(lines)!;
|
||||
NotifyLogin notifyLoginNew = JsonConvert.DeserializeObject<NotifyLogin>(lines)!;
|
||||
|
||||
foreach (PropertyCompareResult resultItem in Compare(notifyLogin, notifyLoginNew))
|
||||
try
|
||||
{
|
||||
Console.WriteLine(" Property name: {0} -- old: {1}, new: {2}",
|
||||
resultItem.Name, resultItem.OldValue ?? "<null>", resultItem.NewValue ?? "<null>");
|
||||
NotifyLogin notifyLoginNew = JsonConvert.DeserializeObject<NotifyLogin>(File.ReadAllText("Data/NotifyLogin.json"))!;
|
||||
NotifyTaskData notifyTaskData = JsonConvert.DeserializeObject<NotifyTaskData>(File.ReadAllText("Data/NotifyTaskData.json"))!;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue