Class CompositeSpecimenCommand

Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll

Aggregates a set of ISpecimenCommand. Executing the aggregate will trigger the execution of the parts.

public class CompositeSpecimenCommand : ISpecimenCommand

Inheritance

objectCompositeSpecimenCommand

Implements

ISpecimenCommand

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

CompositeSpecimenCommand(IEnumerable<ISpecimenCommand>)

Initializes a new instance of CompositeSpecimenCommand class with the supplied set of commands.

public CompositeSpecimenCommand(IEnumerable<ISpecimenCommand> commands)

Parameters

commands IEnumerable<ISpecimenCommand>

The child commands.

CompositeSpecimenCommand(params ISpecimenCommand[])

Initializes a new instance of CompositeSpecimenCommand class with the supplied set of commands.

public CompositeSpecimenCommand(params ISpecimenCommand[] commands)

Parameters

commands ISpecimenCommand[]

The child commands.

Properties

Commands

Gets the child commands.

public IEnumerable<ISpecimenCommand> Commands { get; }

Property Value

IEnumerable<ISpecimenCommand>

Methods

Execute(object, ISpecimenContext)

Executes all child commands using a given specimen and context.

public void Execute(object specimen, ISpecimenContext context)

Parameters

specimen object

The specimen on which the child commands will be executed.

context ISpecimenContext

The context of specimen.