Feature:Asynchronous Operation & Formatting Code

- Now the async operation is enabled!
- Code formatted by Resharper plugin <3
This commit is contained in:
Somebody
2024-07-22 17:12:03 +08:00
parent e983375620
commit 87d228eb79
793 changed files with 34764 additions and 40190 deletions

View File

@@ -1,25 +1,18 @@
using EggLink.DanhengServer.Data.Config.Task;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EggLink.DanhengServer.Data.Config
namespace EggLink.DanhengServer.Data.Config;
public class LevelInitSequeceConfigInfo
{
public class LevelInitSequeceConfigInfo
{
public List<TaskConfigInfo> TaskList { get; set; } = [];
public List<TaskConfigInfo> TaskList { get; set; } = [];
public static LevelInitSequeceConfigInfo LoadFromJsonObject(JObject obj)
{
LevelInitSequeceConfigInfo info = new();
if (obj.ContainsKey(nameof(TaskList)))
{
info.TaskList = obj[nameof(TaskList)]?.Select(x => TaskConfigInfo.LoadFromJsonObject((x as JObject)!)).ToList() ?? [];
}
return info;
}
public static LevelInitSequeceConfigInfo LoadFromJsonObject(JObject obj)
{
LevelInitSequeceConfigInfo info = new();
if (obj.ContainsKey(nameof(TaskList)))
info.TaskList = obj[nameof(TaskList)]?.Select(x => TaskConfigInfo.LoadFromJsonObject((x as JObject)!))
.ToList() ?? [];
return info;
}
}
}