On Wed, 2010-07-14 at 16:51 -0700, N!cky wrote:
> Have you found the solution to this problem? I just recently
> encountered it and haven't found a solution.
I can guess; you can test and report back. ;-)
My guess is that in your restricted AppDomain, Assembly.GetTypes() only
returns public types, while the sole IDataMapper implementation is
internal (and thus likely won't be returned).
Unfortunately, there is no way to get internal types via some
Assembly.GetTypes() overload.
Thus, a fix (that won't be accepted into svn) is to edit
src/DbLinq/Data/Linq/Sugar/Implementation/DataMapper.cs and make the
DataMapper type public instead of internal
You will likely need to make other types public as well.
This won't be accepted into DbLinq because that would require exporting
additional types from Mono's System.Data.Linq.dll, which would be an API
incompatibility.
Two permanent solutions are:
1. Remove the ObjectFactory entirely, and rely on hard-coded types.
I'm in favor of this, as I don't see why IoC-like containers are
useful in the case of DbLinq.
2. Do as other types do, and change DataMapper to be:
#if !MONO_STRICT
public
#endif
class DataMapper : IDataMapper {...}
This will make DataMapper public in the default DbLinq build (yay?), but
I'm leery about making a "Implementation" type public (check the
namespace/directory).
Again, I'm in favor of eventually removing the IoC stuff.
- Jon
--
You received this message because you are subscribed to the Google Groups
"DbLinq" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/dblinq?hl=en.