Using private variables in cached .net classes is a recipe for strange and often hard to debug problems.
See for instance: http://code-smart.org.uk/information/beware-asp-net-mvc-actionfilterattributes-are-cached-between-requests/
This can leed to session mixups/swapping! Usually these problems are blamed on not setting the output cache correctly.
Can (should?) Resharper detect these problems? Or is there another way?
It sounds like something nDepend might be able to do, it has a feature to be pretty much write linq to analyse code.
Here's some details about CLinq: https://www.ndepend.com/default-rules/webframe.html
It can be also used as part of your gated build pipeline: https://www.ndepend.com/docs/ndepend-console
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With