Class OmitOnRecursionGuard
Recursion handler that returns OmitSpecimen 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 OmitOnRecursionHandler.", true)]
public class OmitOnRecursionGuard : RecursionGuard, ISpecimenBuilderNode, ISpecimenBuilder, IEnumerable<ISpecimenBuilder>, IEnumerable
Constructors
| Improve this Doc View SourceOmitOnRecursionGuard(ISpecimenBuilder)
Initializes a new instance of the OmitOnRecursionGuard class.
Declaration
public OmitOnRecursionGuard(ISpecimenBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
ISpecimenBuilder | builder | The builder to decorate. |
OmitOnRecursionGuard(ISpecimenBuilder, IEqualityComparer)
Initializes a new instance of the OmitOnRecursionGuard class.
Declaration
public OmitOnRecursionGuard(ISpecimenBuilder builder, IEqualityComparer comparer)
Parameters
Type | Name | Description |
---|---|---|
ISpecimenBuilder | builder | The builder to decorate. |
System.Collections.IEqualityComparer | comparer | An System.Collections.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.
Declaration
[Obsolete("This class will be removed in a future version of AutoFixture. Instead, use an instance of RecursionGuard, composed with an instance of OmitOnRecursionHandler.", true)]
public override object HandleRecursiveRequest(object request)
Parameters
Type | Name | Description |
---|---|---|
System.Object | request | The recursion-causing request. |
Returns
Type | Description |
---|---|
System.Object | An OmitSpecimen instance. |
Overrides
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable