Can Resharper be set to warn if IDisposable not handled correctly?

前端 未结 5 1496
醉话见心
醉话见心 2020-12-01 18:00

Is there a setting in Resharper 4 (or even Visual Studio itself...) that forces a warning if I forget to wrap code in a using block, or ommit the proper Dispose

5条回答
  •  余生分开走
    2020-12-01 18:33

    You could design a small add-in to R# that you could have run inside the code editor that scans the code and updates the code analysis to reflect that you an object who's missing the structure you've just described.

    I'd look into the R# plugin architecture if you decide to go that route.

提交回复
热议问题