frhagn / Typewriter

Automatic TypeScript template generation from C# source files
http://frhagn.github.io/Typewriter
Apache License 2.0
536 stars 132 forks source link

How to get current class in base Method #320

Open luizfbicalho opened 5 years ago

luizfbicalho commented 5 years ago

I have this methos im my angular service tst

IEnumerable<Method> BaseClassMethods(Class clas) { return clas.BaseClass.Methods; }

Because my controller has a base controller that is generic, a crud controller. How can I get in my base method, the current class to replace the method return type from generic to specific?

saeedcheginy commented 5 years ago

I think you would be able to reach it from 'Parent' property in your method object.

luizfbicalho commented 5 years ago

But the parent of the method is the class.