-
Notifications
You must be signed in to change notification settings - Fork 33
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
Export attributes should only be allowed on class #261
Comments
Were you looking to do an export of a property? In older version of Grace I supported it but dropped it a while back because it didn't seem like a useful feature. Then again attributes went out of vogue for a while when Fluent was all the rage. |
Personally I like attributes. I don't like having a central point where tens if not hundreds of exports are declared. Attributes keep the information local to where the code is and avoid merge conflicts. I was looking to export specific instances (singletons) but it's not a key case and wouldn't say it's a very useful feature. I was thrown-off by the contradiction that the attributes describe themselves as meaningful on properties and methods, but actually don't work. If they could target classes only I wouldn't have lost some time trying to make them work. |
Yeah it is interesting how fluent registrations became so popular because registering hundreds (we have 500+) by hand sounds horrible. I usually just export a whole assembly by interface and apply lifestyles based on naming convention and patch any missing piece with fluent registration (there isn't usually much). I'll make the change to the attribute usage to clear up any confusion. Sorry for the inconvenience. |
I'm going to close this as completed |
@ipjohnson sorry to necro that old issue, but I do have a related question: I have cases where some of my assemblies has to export from a factory method. |
I wanted to export some instances with attributes, so I was pleasantly surprised that
ExportAttribute
can be put on a property.Some research later, I find nothing in Grace code that looks at export attributes on anything else than a class, so their attribute target should probably be changed.
The text was updated successfully, but these errors were encountered: