I have a number of C# custom events that are associated with items being selected in a tree and then a context menu being used to trigger some action on the selected items. I started creating a separate EventArgs-based class for each custom event, to package the necessary data for the event.
In hind-sight though, I realize that most (maybe all) of my custom events will need to pass at least the list of underlying objects represented by the tree selection. Some events will likely need additional data as well.
With that in mind, I wonder if either of the following is an acceptable practice?
Use the same custom EventArgs-based class for multiple events (those that just need the object list to be passed). Obviously, that should work, but seems to break away from some of the recommended naming conventions used for wiring the event machinery.
Create a base class that wraps up my often-needed object list, and then derive additional classes from it as additional data is needed.
Maybe something else entirely?
Currently, I only have a handful of custom events, but need to add more. Since I see a pattern emerging with regard to the data needed by each event, I'd like to have a better plan before continuing.
Thanks for any advice.