mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Add YamlObjectSerializer.NodeToType with generic argument (#1456)
This commit is contained in:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user