feat: implement basic support for c# params#150
feat: implement basic support for c# params#150MeikelLP wants to merge 1 commit intonuskey8:mainfrom
Conversation
|
@akeit0 I saw you are actively working on the v0.5 branch. I implemented this PR also on the v0.5 branch. Feel free to check it out: https://github.com/MeikelLP/Lua-CSharp/tree/feature/params-v5 |
|
It seems good. |
|
@akeit0 I saw you released 0.5 Is this PR obsolete? How do you do params now? I tried the following but get an [LuaObject]
partial class ObjWrapperLuaCsharp
{
public string? Function { get; set; }
public LuaValue[]? Arguments { get; set; }
[LuaMember("yield")]
public void yield(string function, params LuaValue[] args)
{
Function = function;
Arguments = args[1..];
}
} |
|
I apologize for leaving your PR unaddressed. |
|
I'm fine with closing this PR. It was a simple implementation back when I needed it. Just update me when you implemented it :) |
This PR brings basic functionality for C# method
paramsin the source generator. Basically supporting methods like this:I tested this use case and tried to not break anything else while doing it. I cannot confirm that all use cases are covered. I will try other use cases too in the future. Please see this as a proof of work and not a fully fledged feature.
I'm implementing this because my Lua integration needs this feature. I'm testing this PR in my project and will apply further fixes if necessary.