Right now we use C# Actions for events to propagate changes like so:
/// <summary>
/// Event gets triggered when a new TUIO 1.1 cursor is recognized.
/// </summary>
public event Action<Tuio11Cursor> OnCursorAdded;
...
OnCursorAdded?.Invoke(cursor);
To increase compatibility and fullfill expectations of other .Net developers I suggest to use the Event Pattern.
Suggestion
/// <summary>
/// Event gets triggered when a new TUIO 1.1 cursor is recognized.
/// </summary>
public event EventHandler<Tuio11Cursor> OnCursorAdded;
...
OnCursorAdded?.Invoke(this, cursor);
This would lead to breaking changes since the listener to the event would need to change the method signature from:
Problem
Right now we use C# Actions for events to propagate changes like so:
To increase compatibility and fullfill expectations of other .Net developers I suggest to use the Event Pattern.
Suggestion
This would lead to breaking changes since the listener to the event would need to change the method signature from:
To:
Thoughts
I am aware that breaking changes in the public API are an issue. But having a standardized way of using events should be worth the possible trouble.