server-master/srcs/WingsAPI.Scripting.LUA/Extension/DynValueExtension.cs
2026-02-10 18:21:30 +01:00

12 lines
No EOL
393 B
C#

using System.Collections.Generic;
using MoonSharp.Interpreter;
namespace WingsAPI.Scripting.LUA.Extension
{
public static class DynValueExtension
{
public static T GetValue<T>(this Table table, string key) => table.Get(key).ToObject<T>();
public static IEnumerable<T> GetValues<T>(this Table table, string key) => table.Get(key).ToObject<IEnumerable<T>>();
}
}