This commit is contained in:
Razmoth
2023-09-22 20:31:55 +04:00
parent d594f90fec
commit 6ebeaeee3f
48 changed files with 5886 additions and 81 deletions

View File

@@ -0,0 +1,25 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
namespace AssetStudio
{
public static class ArrayYAMLExtensions
{
public static YAMLNode ExportYAML(this byte[] _this)
{
StringBuilder sb = new StringBuilder(_this.Length * 2);
for (int i = 0; i < _this.Length; i++)
{
sb.AppendHex(_this[i]);
}
return new YAMLScalarNode(sb.ToString(), true);
}
public static YAMLNode ExportYAML<T>(this T[][] _this, int[] version)
where T : IYAMLExportable
{
return ((IEnumerable<IEnumerable<T>>)_this).ExportYAML(version);
}
}
}