Simplified Handler Methods
Standard .Net event handler methods have a signature with a sender and an event args.
For example:
1 | public void HandleSomeEvent( object sender, SomeEventArgs eventArgs); |
Omit sender
Argument
Most of the times, the sender is not relevant to the handling method.
Therefore you can simplify the signature to:
1 | public void HandleSomeEvent(SomeEventArgs eventArgs); |
The event broker will still call this handler method. It just omits the sender
argument.
Automatically extract Generic Event Arguments
When using EventArgs<T>
, you can omit the EventArgs
, too.
Instead of
1 | public void HandleSomeEvent(EventArgs< string > eventArgs); |
you can write
1 | public void HandleSomeEvent( string value); |
Note that this works only with the Appccelerate.EventArgs<T>
.
But we have plans to allow custom extractors to be registered in the future.