generate wrapper code for C#