mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-03 12:46:03 +08:00
Feature:Asynchronous Operation & Formatting Code
- Now the async operation is enabled! - Code formatted by Resharper plugin <3
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user