Events Revisited by Bart De Smet

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Events Revisited

Before getting back to our example, let’s reestablish the way we look at events. Recall how the typical event pattern is based on EventHandler<T> as the signature of an event and its handlers:

public delegate void EventHandler<TEventArgs>(object sender, TEventArgs e);

Every time such an event is raised, we get some data that travels from the event source to the listener, represented as an instance of the TEventArgs argument. In other words, it’s fair to say that events are data sources. For example, in our CountDown example the event source is really a data source producing decreasing values representing the number of seconds that are left until the countdown finishes.

When someone says “data,” they immediately think about querying ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required