Class DisposableTrackingCustomization

Namespace: AutoFixture
Assembly: AutoFixture.dll

Encapsulates a customization that adds tracking of disposable specimens to an IFixture.

public class DisposableTrackingCustomization : ICustomization, IDisposable

Inheritance

objectDisposableTrackingCustomization

Implements

ICustomization, IDisposable

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Remarks

Customize an `IFixture` to enable tracking of disposable specimens. Invoke `Dispose` on the instance to dispose of all tracked instances.

Constructors

DisposableTrackingCustomization()

Initializes a new instance of the DisposableTrackingCustomization class.

public DisposableTrackingCustomization()

Properties

Behavior

Gets the behavior that this customization adds to IFixture instances.

public DisposableTrackingBehavior Behavior { get; }

Property Value

DisposableTrackingBehavior

See Also

DisposableTrackingBehavior

Methods

Customize(IFixture)

Customizes the specified fixture by applying Behavior.

public void Customize(IFixture fixture)

Parameters

fixture IFixture

The fixture to customize.

Dispose()

Disposes Behavior.

public void Dispose()

Dispose(bool)

Disposes Behavior.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

See Also

DisposableTrackingBehavior