Class OmitOnRecursionHandler
Breaks a recursion by instructing AutoFixture to ignore the current request.
Inheritance
System.Object
OmitOnRecursionHandler
Implements
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.Kernel
Assembly: AutoFixture.dll
Syntax
public class OmitOnRecursionHandler : IRecursionHandler
Methods
| Improve this Doc View SourceHandleRecursiveRequest(Object, IEnumerable<Object>)
Handles a recursive request by instructing AutoFixture to ignore
request
.
Declaration
public object HandleRecursiveRequest(object request, IEnumerable<object> recordedRequests)
Parameters
Type | Name | Description |
---|---|---|
System.Object | request | The request causing the recursion. |
System.Collections.Generic.IEnumerable<System.Object> | recordedRequests | Previously recorded, and yet unhandled, requests. |
Returns
Type | Description |
---|---|
System.Object | A new OmitSpecimen instance. |
Remarks
This method is called when AutoFixture detects an infinite
recursion. The request
is the request that
triggered the recursion detection;
recordedRequests
contains all previous, but
still unhandled requests: the current call stack, if you will.
This implementation instructs AutoFixture to ignore the request by returning an OmitSpecimen instance.