This PR replaces the use of null-coalescing defaults on nullable booleans with explicit equality checks across instance control methods. The changes make the intent clearer by ensuring only a true result is treated as a positive outcome.
- Consider using the equality operators when evaluating `bool?`: DeepSource flagged instances where `GetInstance(...)?... ?? false` was used to coerce a nullable bool to false implicitly. We replaced these patterns in `PauseOnInstance`, `ResumeOnInstance`, and `KillOnInstance` with `== true` comparisons. Using `== true` clearly indicates that only an explicit true value returns a positive result and avoids ambiguity when the value is null.
> This Autofix was generated by AI. Please review the change before merging.
This PR refactors numerous lambda expressions by removing unnecessary braces and streamlining single-statement lambdas throughout the codebase, improving readability and maintainability.
- Consider simplifying lambda when its body has a single statement: DeepSource flagged lambdas written with a block body for only one statement, causing extra verbosity. This update converts those to concise expression-bodied lambdas by stripping out the curly braces, applied across test assertions, event registrations, and unregister logic. The code is now cleaner and more consistent.
> This Autofix was generated by AI. Please review the change before merging.