John,

Thanks so much for these suggestions. I'll focus on this today. I
really want this to work considering I have chosen MySQL as my
datasource for a very important project. The solution works
beautifully until i move it to a medium trust environment.

I like the idea of IOC, I think it's great, but like you, I do not
feel that it is always the most beneficial solution, especially when
developing in an environment which may or may not run on a medium
trust environment.

Though I must say that I was able to use IOC in a recent web app that
was deployed to a medium trust environment. The app uses the Castle
IOC. I mention this only to say that it is possible

On Jul 15, 9:46 am, Jonathan Pryor <[email protected]> wrote:
> 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.

Reply via email to