mirror of
https://github.com/Dongyifengs/AssetStudio-Genshin-MoYi.git
synced 2025-05-07 20:09:19 +08:00
32 lines
670 B
C#
32 lines
670 B
C#
namespace AssetStudio
|
|
{
|
|
public static class YAMLMappingNodeExtensions
|
|
{
|
|
public static void AddSerializedVersion(this YAMLMappingNode _this, int version)
|
|
{
|
|
if(version > 1)
|
|
{
|
|
_this.Add(SerializedVersionName, version);
|
|
}
|
|
}
|
|
|
|
public static void ForceAddSerializedVersion(this YAMLMappingNode _this, int version)
|
|
{
|
|
if (version > 0)
|
|
{
|
|
_this.Add(SerializedVersionName, version);
|
|
}
|
|
}
|
|
|
|
public static void InsertSerializedVersion(this YAMLMappingNode _this, int version)
|
|
{
|
|
if(version > 1)
|
|
{
|
|
_this.InsertBegin(SerializedVersionName, version);
|
|
}
|
|
}
|
|
|
|
public const string SerializedVersionName = "serializedVersion";
|
|
}
|
|
}
|