Last active
March 23, 2025 05:20
-
-
Save SebastiaanLubbers/8645623 to your computer and use it in GitHub Desktop.
EventManager.Dispatcher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace EventManager | |
| { | |
| public delegate void DispatchDelegate(object sender, object source, object target, object data); | |
| public class Dispatcher | |
| { | |
| public event DispatchDelegate OnDispatch; | |
| public void Dispatch(object source, object target, object data) | |
| { | |
| if (OnDispatch != null) | |
| OnDispatch(this, source, target, data); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment