Class FieldSpecification
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
A specification that determines whether the request is a request
for a FieldInfo matching the specified name and Type.
public class FieldSpecification : IRequestSpecificationInheritance
Implements
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
FieldSpecification(Type, string)
Initializes a new instance of the FieldSpecification class.
public FieldSpecification(Type targetType, string targetName)Parameters
targetType Type
The Type with which the requested
FieldInfo type should be compatible.
targetName string
The name which the requested FieldInfo name
should match exactly.
Exceptions
targetType or
targetName is null.
FieldSpecification(IEquatable<FieldInfo>)
Initializes a new instance of the FieldSpecification class.
public FieldSpecification(IEquatable<FieldInfo> target)Parameters
target IEquatable<FieldInfo>
The criteria used to match the requested
FieldInfo.
Exceptions
target is null.
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.