OData / OData.Neo

111 stars 18 forks source link

ExpressionBroker is in an invalid state #31

Closed TehWardy closed 1 year ago

TehWardy commented 1 year ago

GenerateExpressionAsync is not consuming the scriptOptions or the passed in LINQ Expression ...

    public async ValueTask<Expression> GenerateExpressionAsync<T>(string linqExpression)
    {
        Globals<T> globals = GetGlobalVariables<T>();
        ScriptOptions scriptOptions = GetScriptOptions<T>();
        string script = GetScript(linqExpression);

        ScriptState<Expression> state =
            await CSharpScript.RunAsync<Expression>(
                code: null,
                null,
                globals);

        return state.ReturnValue;
    }

Fix this then ensure all unit tests pass.