Roblox-File-Format/Tokens/SecurityCapabilities.cs

27 lines
659 B
C#
Raw Permalink Normal View History

2023-11-29 03:07:30 +00:00
using System.Xml;
namespace RobloxFiles.Tokens
{
public class SecurityCapabilitiesToken : IXmlPropertyToken
{
public string XmlPropertyToken => "SecurityCapabilities";
public bool ReadProperty(Property prop, XmlNode node)
{
if (ulong.TryParse(node.InnerText, out var value))
{
prop.Value = value;
return true;
}
return false;
}
public void WriteProperty(Property prop, XmlDocument doc, XmlNode node)
{
var value = prop.CastValue<ulong>();
node.InnerText = value.ToString();
}
}
}