Class BooleanSwitch
Creates an alternating sequence of true and false.
Inheritance
System.Object
BooleanSwitch
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
Assembly: AutoFixture.dll
Syntax
public class BooleanSwitch : ISpecimenBuilder
Constructors
| Improve this Doc View SourceBooleanSwitch()
Initializes a new instance of the BooleanSwitch class.
Declaration
public BooleanSwitch()
Methods
| Improve this Doc View SourceCreate()
Returns an alternating sequence of true and false every other time it is invoked.
Declaration
[Obsolete("Please use the Create(request, context) method as this overload will be removed to make API uniform.")]
public bool Create()
Returns
Type | Description |
---|---|
System.Boolean | true, followed by false at the next invocation, and so on. |
Create(Object, ISpecimenContext)
Returns an alternating sequence of true and false every other time it is invoked.
Declaration
public object Create(object request, ISpecimenContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Object | request | The request that describes what to create. |
ISpecimenContext | context | Not used. |
Returns
Type | Description |
---|---|
System.Object | true, followed by false at the next invocation, and
so on, if |
CreateAnonymous()
Returns an alternating sequence of true and false every other time it is invoked.
Declaration
[Obsolete("Please move over to using Create() as this method will be removed in the next release", true)]
public bool CreateAnonymous()
Returns
Type | Description |
---|---|
System.Boolean | true, followed by false at the next invocation, and so on. |
Remarks
Obsolete: Please move over to using Create() as this method will be removed in the next release.