Roblox-File-Format/Tokens/Int64.cs

21 lines
572 B
C#
Raw Normal View History

using System.Xml;
2021-02-25 20:09:54 +00:00
using RobloxFiles.XmlFormat;
2021-02-25 20:09:54 +00:00
namespace RobloxFiles.Tokens
{
public class Int64Token : IXmlPropertyToken
{
2021-02-25 20:09:54 +00:00
public string XmlPropertyToken => "int64";
public bool ReadProperty(Property prop, XmlNode token)
{
return XmlPropertyTokens.ReadPropertyGeneric<long>(prop, PropertyType.Int64, token);
}
public void WriteProperty(Property prop, XmlDocument doc, XmlNode node)
{
long value = prop.CastValue<long>();
node.InnerText = value.ToString();
}
}
}