Class ReadonlyCollectionPropertiesCommand
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
A command which invokes Add(%600) to fill all readonly properties in a specimen that
implement ICollection%601.
public class ReadonlyCollectionPropertiesCommand : ISpecimenCommandInheritance
object ← ReadonlyCollectionPropertiesCommand
Implements
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
ReadonlyCollectionPropertiesCommand()
Constructs an instance of ReadonlyCollectionPropertiesCommand, used to fill all readonly
properties in a specimen that implement ICollection%601.
public ReadonlyCollectionPropertiesCommand()ReadonlyCollectionPropertiesCommand(IPropertyQuery)
Constructs an instance of ReadonlyCollectionPropertiesCommand, used to fill all readonly
properties in a specimen that implement ICollection%601.
public ReadonlyCollectionPropertiesCommand(IPropertyQuery propertyQuery)Parameters
propertyQuery IPropertyQuery
The query that will be applied to select readonly collection properties.
Properties
PropertyQuery
Gets the query used to determine whether or not a specified type has readonly collection properties.
public IPropertyQuery PropertyQuery { get; }Property Value
Methods
Execute(object, ISpecimenContext)
Invokes Add(%600) to fill all readonly properties in a specimen that implement
ICollection%601.
public void Execute(object specimen, ISpecimenContext context)Parameters
specimen object
The specimen on which readonly collection properties should be filled.
context ISpecimenContext
An ISpecimenContext that is used to create the elements used to fill collections.
Exceptions
Thrown if specimen or context is null.