Add YamlObjectSerializer.NodeToType with generic argument (#1456)

This commit is contained in:
DrSmugleaf
2020-12-20 20:46:56 +01:00
committed by GitHub
parent 6972000293
commit e78ab8f922

View File

@@ -614,6 +614,11 @@ namespace Robust.Shared.Serialization
throw new ArgumentException($"Type {type.FullName} is not supported.", nameof(type));
}
public T NodeToType<T>(YamlNode node)
{
return (T) NodeToType(typeof(T), node);
}
private static Type ResolveConcreteType(Type baseType, string typeName)
{
var reflection = IoCManager.Resolve<IReflectionManager>();