or your own implementation of SubDependencyResolver
class SessionResolver : ISubDependencyResolver
{
private readonly IKernel kernel;
public SessionResolver(IKernel kernel)
{
this.kernel = kernel;
}
public object Resolve(...)
{
return kernel.Resolve<ISessionManager>().OpenSession();
}
public bool CanResolve(...)
{
return typeof(ISession).IsAssignableFrom
(dependency.TargetType));
}
}
On Sep 3, 8:52 am, Tuna Toksoz <[email protected]> wrote:
> using Factory Support facility.
>
> Tuna Toksöz
> Eternal sunshine of the open source mind.
>
> http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitter.com/tehlike
>
> 2009/9/3 DannyT <[email protected]>
>
> > I'm trying to use Rhino.Security which has a dependency on ISession.
> > However when using NHibernateFacility we only have an ISessionManager
> > registered in the container. Can anyone suggest how to get ISession
> > registered in the container from the ISessionManager? Or alternatively
> > somehow tell ISession to reference ISessionManager.OpenSession()?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" 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/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---