Added support for SharedStrings and SSTR chunk type

This commit is contained in:
CloneTrooper1019
2019-05-17 01:14:04 -05:00
parent 32e80bdd9a
commit 45a84e34d0
15 changed files with 266 additions and 91 deletions

View File

@ -37,19 +37,21 @@ namespace RobloxFiles.XmlFormat
public static bool ReadTokenGeneric<T>(Property prop, PropertyType propType, XmlNode token) where T : struct
{
Type resultType = typeof(T);
TypeConverter converter = TypeDescriptor.GetConverter(resultType);
if (converter != null)
try
{
Type resultType = typeof(T);
TypeConverter converter = TypeDescriptor.GetConverter(resultType);
object result = converter.ConvertFromString(token.InnerText);
prop.Type = propType;
prop.Value = result;
return true;
}
return false;
catch
{
return false;
}
}
public static IXmlPropertyToken GetHandler(string tokenName)