Table of Contents

Method GetConstructorArgument

Namespace
Xunit.v3
Assembly
xunit.v3.core.dll

GetConstructorArgument(TContext, ConstructorInfo, int, ParameterInfo)

Tries to supply a test class constructor argument.

protected virtual ValueTask<object?> GetConstructorArgument(TContext ctxt, ConstructorInfo constructor, int index, ParameterInfo parameter)

Parameters

ctxt TContext

The context that describes the current test class

constructor ConstructorInfo

The constructor that will be used to create the test class.

index int

The parameter index.

parameter ParameterInfo

The parameter information.

Returns

ValueTask<object>

Returns the constructor argument if available, null otherwise.