Class SpecifiedNullCommand<T, TProperty>
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
A no-op that identifies a certain property or field.
[Obsolete("This class is no longer used, and will be removed in future versions.", true)]
public class SpecifiedNullCommand<T, TProperty> : ISpecifiedSpecimenCommand<T>, IRequestSpecificationType Parameters
T
The type of specimen.
TProperty
The type of property or field.
Inheritance
object ← SpecifiedNullCommand<T, TProperty>
Implements
ISpecifiedSpecimenCommand<T>, IRequestSpecification
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
This class can be used to reserve an identified property or field without doing anything with it.
Constructors
SpecifiedNullCommand(Expression<Func<T, TProperty>>)
Initializes a new instance of the
SpecifiedNullCommand%602 class with the supplied
property picker expression.
public SpecifiedNullCommand(Expression<Func<T, TProperty>> propertyPicker)Parameters
propertyPicker Expression<Func<T, TProperty>>
An expression that identifies a property or field.
Properties
Member
Gets the member identified by the expression supplied through the constructor.
public MemberInfo Member { get; }Property Value
Methods
Execute(T, ISpecimenContext)
Does nothing.
public void Execute(T specimen, ISpecimenContext context)Parameters
specimen T
A specimen.
context ISpecimenContext
An ISpecimenContext.
IsSatisfiedBy(object)
Evaluates whether a request matches the property or field reserved by this command.
public bool IsSatisfiedBy(object request)Parameters
request object
The specimen request.
Returns
true if request is is a PropertyInfo
or FieldInfo that identifies the property or field reserved by this
BindingCommand%602; otherwise, false.