-
Notifications
You must be signed in to change notification settings - Fork 687
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
In class AssemblyTypeSource, use of Assembly.GetTypes is breaking change #185
Comments
I think the default behaviour should be GetExportedTypes. And if different behaviour is needed, may be Fluent should provide one or two shortcuts (like GetTypes mentioned above). Any thoughts? |
Yes I think .GetTypes would be unusual. Perhaps an overload to the FluentMappings.AddFromAssemblyOf() methods would have been better, e.g. FluentMappings.AddFromAssemblyOf(getNonPublicTypes: true) |
If I'm not too busy this week, I'll do it |
The change to use GetTypes was deliberate. One of the most common beginner There's also a set of users don't like making their mappings public, and Happy for there to be an overload/switch somewhere though. I'm undecided on On Tue, Oct 30, 2012 at 1:19 AM, Gleb Chermennov
James Gregory Tel: +61 (0) 411 619 513 |
I see. In that case, I think that adding a line in docs will do for now |
In FluentNH 1.2 and prior the class AssemblyTypeSource implemented the ITypeSource.GetTypes method using Assembly.GetExportedTypes. The new implementation in FluentNH uses Assembly.GetTypes.
GetExportedTypes only requires dependent DLLs to be in the application bin directory when types from that DLL are exposed publicly, where GetTypes requires all dependent DLLs to be in the appication's bin directory, even if they are only used privately.
This change in behaviour can be annoying. I'm not sure if it was intended or if there is a work around.
The text was updated successfully, but these errors were encountered: