I'm not alone in this opinion - but aware it's likely to be contentious. 馃槃 @nunit/engine-team - anyone else feel as strongly as I do? If we agree, I'm happy to supply the PR for this.
See also https://twitter.com/hashtag/endregions :)
I don't feel strongly about it, but I can't put forth any argument in favor of them and they are a minor nuisance especially because of reformatting.
If a class is too large, the best option is to extract a responsibility out to a separate class. In cases where that's not possible, such as Windows Forms controls with dozens of properties with boilerplate, partial files are so much nicer to use than regions. I like nice things, especially if you're willing to do the legwork! 馃槅
IMO if using regions because file is large or to separate logical pieces, that is a bad use.
I've always used to separate things by interface and visibility but I'm not overly attached.
Are you thinking of this as some kind of standard for the project? For all projects? If not, what happens when someone adds a region?
Are you thinking of this as some kind of standard for the project? For all projects?
Sure. Just for this repo - I don't think the Nunit org should dictate this sort of thing to the projects.
Then should there be a doc somewhere for the project or is it just word of mouth in the team and in code reviews? Personally, I think word of mouth is OK so long as you keep it simple enough.
I'm fine to get rid of them especially since they never seem to fix that bug where the regions get un-indented when you add other #if type pragmas. I also find them much less useful than they used to be with the great navigation in recent versions of VS.
I'd be happy to do this in the framework project too and I think word of mouth is probably good enough. The only issue might be merge conflicts for outstanding PRs, but we can deal with that.
Most helpful comment
I'm fine to get rid of them especially since they never seem to fix that bug where the regions get un-indented when you add other
#iftype pragmas. I also find them much less useful than they used to be with the great navigation in recent versions of VS.I'd be happy to do this in the framework project too and I think word of mouth is probably good enough. The only issue might be merge conflicts for outstanding PRs, but we can deal with that.