Class ImplementedInterfaceSpecification

Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll

A specification that determines whether the request is a request for a Type that implements the specified interface Type.

public class ImplementedInterfaceSpecification : IRequestSpecification

Inheritance

objectImplementedInterfaceSpecification

Implements

IRequestSpecification

Inherited Members

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

Constructors

ImplementedInterfaceSpecification(Type)

Initializes a new instance of the ImplementedInterfaceSpecification class.

public ImplementedInterfaceSpecification(Type targetType)

Parameters

targetType Type

The interface Type which the requested type should implement.

Exceptions

ArgumentNullException

targetType is null.

Properties

TargetType

The interface Type which the requested type should implement.

public Type TargetType { get; }

Property Value

Type

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.