Centeva / TypeScripter

A tool to generate Typescript classes from c# models.
MIT License
4 stars 5 forks source link

Add attribute to filter out objects we don't want. #8

Closed marbletravis closed 7 years ago

marbletravis commented 7 years ago

@darrelbrown I was doing some dabbling with a personal project. I am using .net authentication, for better or for worse, which is giving me ApplicationUserManager, IdenityUser, etc.

These types didn't correctly translate into typescripter types (as currently implemented). We could handle these types (although they aren't needed in this instance). Typescripter seems to struggle when the base class is a generic typed class.

The solution below, adds an attribute to ignore classes. Which solves my issues.

Notes:

I wasn't sure how to make the attribute visible without a DLL and I wasn't sure how to do an .exe and a .dll without having two projects. If there is another way, please advise.

Second, at this point it may makes sense to restructure the folders so the project isn't inside a project. But I didn't want to do that without running it past you.

While I definitely think typescripter should/can handle the issues I think this attribute would come in handy.