Class DisposableTrackingCustomization
Encapsulates a customization that adds tracking of disposable specimens to an IFixture.
Inheritance
System.Object
DisposableTrackingCustomization
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AutoFixture
Assembly: AutoFixture.dll
Syntax
public class DisposableTrackingCustomization : ICustomization, IDisposable
Remarks
Customize an IFixture to enable tracking of disposable specimens. Invoke Dispose() on the instance to dispose of all tracked instances.
Constructors
| Improve this Doc View SourceDisposableTrackingCustomization()
Initializes a new instance of the DisposableTrackingCustomization class.
Declaration
public DisposableTrackingCustomization()
Properties
| Improve this Doc View SourceBehavior
Gets the behavior that this customization adds to IFixture instances.
Declaration
public DisposableTrackingBehavior Behavior { get; }
Property Value
Type | Description |
---|---|
DisposableTrackingBehavior |
See Also
Methods
| Improve this Doc View SourceCustomize(IFixture)
Customizes the specified fixture by applying Behavior.
Declaration
public void Customize(IFixture fixture)
Parameters
Type | Name | Description |
---|---|---|
IFixture | fixture | The fixture to customize. |
Dispose()
Disposes Behavior.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes Behavior.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Implements
System.IDisposable