Class ParameterMatcherBuilder

Namespace: AutoFixture.TUnit.Internal
Assembly: AutoFixture.TUnit.dll

A builder type that creates a IRequestSpecification instance, for a ParameterInfo instance, based on the builder's matching configuration.

public class ParameterMatcherBuilder

Inheritance

objectParameterMatcherBuilder

Inherited Members

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

Constructors

ParameterMatcherBuilder(ParameterInfo)

Creates an instance of type ParameterMatcherBuilder.

public ParameterMatcherBuilder(ParameterInfo parameterInfo)

Parameters

parameterInfo ParameterInfo

The parameter info.

Exceptions

ArgumentNullException

Thrown when parameterInfo is null.

Properties

MatchDirectBaseType

Gets or sets a value indicating whether the direct base type should be matched.

public bool MatchDirectBaseType { get; set; }

Property Value

bool

MatchExactRequest

Gets or sets a value indicating whether the exact parameter request should be matched. Default is true.

public bool MatchExactRequest { get; set; }

Property Value

bool

MatchExactType

Gets or sets a value indicating whether the exact parameter type should be matched.

public bool MatchExactType { get; set; }

Property Value

bool

MatchField

Gets or sets a value indicating whether the field type and name should be matched. The name comparison is case-insensitive.

public bool MatchField { get; set; }

Property Value

bool

MatchImplementedInterfaces

Gets or sets a value indicating whether the interfaces implemented by the parameter type should be matched.

public bool MatchImplementedInterfaces { get; set; }

Property Value

bool

MatchParameter

Gets or sets a value indicating whether the parameter type and name should be matched. The name comparison is case-insensitive.

public bool MatchParameter { get; set; }

Property Value

bool

MatchProperty

Gets or sets a value indicating whether the property type and name should be matched. The name comparison is case-insensitive.

public bool MatchProperty { get; set; }

Property Value

bool

Methods

Build()

Builds the IRequestSpecification instance.

public IRequestSpecification Build()

Returns

IRequestSpecification

A new instance of IRequestSpecification, matching the configuration.

SetFlags(Matching)

Sets the matching flags.

public ParameterMatcherBuilder SetFlags(Matching flags)

Parameters

flags Matching

The matching flags.

Returns

ParameterMatcherBuilder

The current ParameterMatcherBuilder instance.