List of input<T> properties

this just works fine for individual input properties:

public class HandleInput : TestStep
{
    
    public Input<double> InputValue { get; set; }      

    public HandleInput()
    {
        InputValue = new Input<double>();
    }

    public override void Run()
    {           
        Log.Info("Input Value: " + InputValue.Value);
    }
}

however this will not:

public class HandleInput : TestStep
{
    public List<Input<double>> InputValues { get; set; }      

    public HandleInput()
    {
        InputValues = new List<Input<double>>();
        InputValues.Add(new Input<double>());
        InputValues.Add(new Input<double>());
    }

    public override void Run()
    {           
        UpgradeVerdict(Verdict.Pass);
    }
}

Which results as:

input

1 Like

Hi,

List<Input<double>> will not work the way you expect it to.

Instead, you can use Input<List<double>>. It will work properly. Since Input<T> is determined by the Editor as something that can be connected to outputs of the same type.

4 Likes