Class DirectBaseTypeSpecification
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
A specification that determines whether the request is a request
for a Type that directly inherits from the specified Type.
public class DirectBaseTypeSpecification : IRequestSpecificationInheritance
object ← DirectBaseTypeSpecification
Implements
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
DirectBaseTypeSpecification(Type)
Initializes a new instance of the DirectBaseTypeSpecification class.
public DirectBaseTypeSpecification(Type targetType)Parameters
targetType Type
The Type from which
the requested type should directly inherit.
Exceptions
targetType is null.
Properties
TargetType
The Type from which
the requested type should directly inherit.
public Type TargetType { get; }Property Value
Methods
IsSatisfiedBy(object)
Evaluates a request for a specimen.
public bool IsSatisfiedBy(object request)Parameters
request object
The specimen request.
Returns
true if request is satisfied by the Specification;
otherwise, false.