Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reverse-generate typealized interfaces to get started with code-first in existing code-bases #96

Open
earloc opened this issue Feb 8, 2023 · 1 comment

Comments

@earloc
Copy link
Owner

earloc commented Feb 8, 2023

As a developer, I want to reverse-engineer existing *.resx into typealized interfaces, to start leveraging the code-first approach in existing codebases.

@earloc
Copy link
Owner Author

earloc commented Feb 10, 2023

Easy for genarating simple properties.
Not so easy for formatted strings.

Assuming resource-keys or - values may contain format parameters like {0}, etc, the generator may use this as a foundation to generate the interface. It's very unprobable that those parameters are in a notation understood well by TypealizR in order to generate meaningful method names.

Another problematic scenario to follow is when devs would start to manipulate the reverse-engineered Interfaces, which would result in new keys, with no way to detect the original key/value when exporting.

Maybe this would need to introduce some kind of a annotation (probably an attribute) to "lock-in" to a certain key 🤔, which would be generated over method names.

This attribute may then even be used in pure code-first approaches to let people influence names during export.

[TypealizedKey("SomeKeyName) ] or something similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant