using System; namespace SerializableCallback { /// /// https://github.com/Siccity/SerializableCallback /// public class InvokableEvent : InvokableEventBase { /// /// https://github.com/Siccity/SerializableCallback /// public System.Action action; /// /// https://github.com/Siccity/SerializableCallback /// public void Invoke() { action(); } /// /// https://github.com/Siccity/SerializableCallback /// /// public override void Invoke(params object[] args) { action(); } /// /// Constructor /// /// /// public InvokableEvent(object target, string methodName) { if (target == null || string.IsNullOrEmpty(methodName)) { action = () => {}; } else { action = (System.Action)System.Delegate.CreateDelegate(typeof(System.Action), target, methodName); } } } /// /// https://github.com/Siccity/SerializableCallback /// /// public class InvokableEvent : InvokableEventBase { /// /// https://github.com/Siccity/SerializableCallback /// public Action action; /// /// https://github.com/Siccity/SerializableCallback /// /// public void Invoke(T0 arg0) { action(arg0); } /// /// https://github.com/Siccity/SerializableCallback /// /// public override void Invoke(params object[] args) { action((T0)args[0]); } /// /// Constructor /// /// /// public InvokableEvent(object target, string methodName) { if (target == null || string.IsNullOrEmpty(methodName)) { action = x => {}; } else { action = (System.Action)System.Delegate.CreateDelegate(typeof(System.Action), target, methodName); } } } /// /// https://github.com/Siccity/SerializableCallback /// /// /// public class InvokableEvent : InvokableEventBase { /// /// https://github.com/Siccity/SerializableCallback /// public Action action; /// /// https://github.com/Siccity/SerializableCallback /// /// /// public void Invoke(T0 arg0, T1 arg1) { action(arg0, arg1); } /// /// https://github.com/Siccity/SerializableCallback /// /// public override void Invoke(params object[] args) { action((T0)args[0], (T1)args[1]); } /// /// Constructor /// /// /// public InvokableEvent(object target, string methodName) { if (target == null || string.IsNullOrEmpty(methodName)) { action = (x, y) => {}; } else { action = (System.Action)System.Delegate.CreateDelegate(typeof(System.Action), target, methodName); } } } /// /// https://github.com/Siccity/SerializableCallback /// /// /// /// public class InvokableEvent : InvokableEventBase { /// /// https://github.com/Siccity/SerializableCallback /// public Action action; /// /// https://github.com/Siccity/SerializableCallback /// /// /// /// public void Invoke(T0 arg0, T1 arg1, T2 arg2) { action(arg0, arg1, arg2); } /// /// https://github.com/Siccity/SerializableCallback /// /// public override void Invoke(params object[] args) { action((T0)args[0], (T1)args[1], (T2)args[2]); } /// /// Constructor /// /// /// public InvokableEvent(object target, string methodName) { if (target == null || string.IsNullOrEmpty(methodName)) { action = (x, y, z) => {}; } else { action = (System.Action)System.Delegate.CreateDelegate(typeof(System.Action), target, methodName); } } } /// /// https://github.com/Siccity/SerializableCallback /// /// /// /// /// public class InvokableEvent : InvokableEventBase { /// /// https://github.com/Siccity/SerializableCallback /// public Action action; /// /// https://github.com/Siccity/SerializableCallback /// /// /// /// /// public void Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) { action(arg0, arg1, arg2, arg3); } /// /// https://github.com/Siccity/SerializableCallback /// /// public override void Invoke(params object[] args) { action((T0)args[0], (T1)args[1], (T2)args[2], (T3)args[3]); } /// /// Constructor /// /// /// public InvokableEvent(object target, string methodName) { if (target == null || string.IsNullOrEmpty(methodName)) { action = (x, y, z, w) => {}; } else { action = (System.Action)System.Delegate.CreateDelegate(typeof(System.Action), target, methodName); } } } }