mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
31 lines
667 B
C#
31 lines
667 B
C#
namespace AssetRipper.Yaml.Extensions;
|
|
|
|
public static class YamlSerializedVersionExtensions
|
|
{
|
|
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";
|
|
}
|