Class ParameterSpecification

Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll

A specification that determines whether the request is a request for a ParameterInfo matching the specified name and Type.

public class ParameterSpecification : IRequestSpecification

Inheritance

objectParameterSpecification

Implements

IRequestSpecification

Inherited Members

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

Constructors

ParameterSpecification(Type, string)

Initializes a new instance of the ParameterSpecification class.

public ParameterSpecification(Type targetType, string targetName)

Parameters

targetType Type

The Type with which the requested ParameterInfo type should be compatible.

targetName string

The name which the requested ParameterInfo name should match exactly.

Exceptions

ArgumentNullException

targetType or targetName is null.

ParameterSpecification(IEquatable<ParameterInfo>)

Initializes a new instance of the ParameterSpecification class.

public ParameterSpecification(IEquatable<ParameterInfo> target)

Parameters

target IEquatable<ParameterInfo>

The criteria used to match the requested ParameterInfo.

Exceptions

ArgumentNullException

target is null.

Methods

IsSatisfiedBy(object)

Evaluates a request for a specimen.

public bool IsSatisfiedBy(object request)

Parameters

request object

The specimen request.

Returns

bool

true if request is satisfied by the Specification; otherwise, false.