Class NullRecursionGuard
Recursion handler that returns null at recursion points.
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
[Obsolete("This class will be removed in a future version of AutoFixture. Instead, use an instance of RecursionGuard, composed with an instance of NullRecursionHandler.", true)]
public class NullRecursionGuard : RecursionGuard, ISpecimenBuilderNode, ISpecimenBuilder, IEnumerable<ISpecimenBuilder>, IEnumerable
Constructors
| Improve this Doc View SourceNullRecursionGuard(ISpecimenBuilder)
Initializes a new instance of the NullRecursionGuard class.
Declaration
public NullRecursionGuard(ISpecimenBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
ISpecimenBuilder | builder | The builder to decorate. |
NullRecursionGuard(ISpecimenBuilder, IEqualityComparer)
Initializes a new instance of the NullRecursionGuard class.
Declaration
public NullRecursionGuard(ISpecimenBuilder builder, IEqualityComparer comparer)
Parameters
Type | Name | Description |
---|---|---|
ISpecimenBuilder | builder | The intercepting builder to decorate. |
System.Collections.IEqualityComparer | comparer | An IEqualitycomparer implementation to use when comparing requests to determine recursion. |
Methods
| Improve this Doc View SourceCompose(IEnumerable<ISpecimenBuilder>)
Composes the supplied builders.
Declaration
public override ISpecimenBuilderNode Compose(IEnumerable<ISpecimenBuilder> builders)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ISpecimenBuilder> | builders | The builders to compose. |
Returns
Type | Description |
---|---|
ISpecimenBuilderNode | A new ISpecimenBuilderNode instance containing
|
Overrides
| Improve this Doc View SourceHandleRecursiveRequest(Object)
Handles a request that would cause recursion by returning null.
Declaration
[Obsolete("This class will be removed in a future version of AutoFixture. Instead, use an instance of RecursionGuard, composed with an instance of NullRecursionHandler.", true)]
public override object HandleRecursiveRequest(object request)
Parameters
Type | Name | Description |
---|---|---|
System.Object | request | The recursion causing request. |
Returns
Type | Description |
---|---|
System.Object | Always null. |
Overrides
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable