Closed bcassell closed 7 years ago
Hi @bcassell, thanks for reporting this issue!
SimpleStubs currently handles events based on the recommended .Net Framework guidelines which is to use the EventHandler pattern.
That being said, if C# supports it, SimpleStubs should support it (ideally).
Just out of curiosity, is there any reason you prefer not to use the EventHandler pattern?
This is not code that I wrote, but code that was handed down to me. I'm interested in moving to the recommended pattern, but won't have the time to do it any time soon. I'm fine with just excluding the associated interfaces because they are not interfaces I intend to stub out, but I just wanted to bring this scenario to your attention because I am enjoying this library :).
Sounds good! Thanks for the feedback :)
I'll keep the issue open and will look into it when I get a chance.
Resolved by #17
When I have events/delegates like the following:
the code generation is confused by the delegate declaration. It seems to be expecting something like, handler(object sender, EventArgs args), rather than the actual delegate declaration.