public static void ClosureActionDoCommand(uint obj, ActionDelegate func) { if (NativeFunctions.ClosureActionDoCommand(obj, NextEventId) != 0) { Closures.Add(NextEventId++, new Closure { OwnerObject = obj, Run = func }); } }