-
Notifications
You must be signed in to change notification settings - Fork 696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make OnMouseXXX
follow the correct pattern
#3284
Comments
Hey I'm all for it, but it's no problem if you want to not bother yet and just leave that for when I do that work. I'll be doing the same thing to a bunch of code anyway, so I already was assuming I'd have to do it. But less work for me is still cool haha. :) But, if you do go ahead and knock it out yourself, here's the general way I've got current stuff designed on my old branch: Almost every event uses I have an interface for all such types to implement, but it's likely to change anyway, so don't worry about that. The CancellationToken is definitely a part of it, though, so if you do that from the start that's awesome. There are also (Verb)ing and (Verb)ed events, for the majority of them, and the wrappers that invoke them use them in a consistent way. Generally, that means:
|
Note that not everything has an -ing and -ed event. A lot of mouse events are in that category. They already get it naturally, if there's a ButtonDown and ButtonUp in addition to the full Click, DoubleClick, etc events. Oh yeah. And, while the guidelines recommend using -ing and -ed, rather than prefixes like Pre-, Before-, After-, etc., I think there is a valid argument to be made for different naming in isolated cases, if forcing it into that box makes something non-sensical. For a contrived example, They also recommend against other suffixes, like |
Dupe of #3029. Closing. |
Make
OnMouseXXX
follow the correct pattern per #3209Originally posted by @tig in #3281 (comment)
The text was updated successfully, but these errors were encountered: