How to use code generation to dynamically create C# methods?

后端 未结 4 1070
忘了有多久
忘了有多久 2021-02-05 17:11

In order to define a method in C that is callable by Lua it has to match a given signature and use the Lua API to retrieve parameters and return results. I\'m writing a C# wrapp

4条回答
  •  天涯浪人
    2021-02-05 17:50

    Try looking into T4. Because it natively part of Visual Studio, you are able to use the reflection framework to find all the methods as per your questions. Search on google and I'm sure you can find some sample code or template of people using reflection with T4 already to generate wrapper classes or methods.

提交回复
热议问题