In C# IDisposable is mostly used to cleanup resources but as we have seen in this “Clean Code Tip” https://youtu.be/NIADlsb1_EY it can also be used to define “scopes of behavior” in a clean and readable way. This video shows another area of application of IDisposable: event guards.
Source code used in this tutorial:
https://github.com/plainionist/AboutCleanCode/tree/main/EventGuards