v1.00.00
This commit is contained in:
25
AssetStudio/YAML/Utils/Extensions/ArrayYAMLExtensions.cs
Normal file
25
AssetStudio/YAML/Utils/Extensions/ArrayYAMLExtensions.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user