using System.Collections.Generic; using System.Linq; using System.Reflection; namespace NexusForever.WorldServer.Command { public class MethodContainer { public object Parent { get; } public MethodInfo Method { get; } /// /// Create a new from the supplied parent object and . /// public MethodContainer(object parent, MethodInfo method) { Parent = parent; Method = method; } public void Invoke(IEnumerable parameters) { Method.Invoke(Parent, parameters.ToArray()); } } }