Skip to content

ModeDetectorScope class

Defined in

Namespace: Splat.Common.Test Assembly: Splat.Common.Test.dll Full name: Splat.Common.Test.ModeDetectorScope Modifiers: public sealed

Summary

View source

        A scope that saves and restores the ModeDetector state for test isolation.
        Use in a using statement to ensure proper cleanup.

Applies to

net11.0, net10.0

Class hierarchy
classDiagram
class ModeDetectorScope
class IDisposable {
    <>
}
IDisposable <|.. ModeDetectorScope

Implements: IDisposable

Examples

[Test]
 public void MyTest()
 {
 using var scope = new ModeDetectorScope();
 // Test code here - ModeDetector will be reset to fresh state after the test
 }

Constructors

NameSummary
.ctorInitializes a new instance of the [ModeDetectorScope](# class. Saves the current ModeDetector state and resets it to default.

Methods

NameSummary
DisposeRestores the ModeDetector to its previous state.
Inherited members