Services needed in multiple named scopes

97 views
Skip to first unread message

schaibaa

unread,
May 4, 2012, 3:26:48 PM5/4/12
to ninject
Hello everyone,

I have a few different workflows in a windows service and these
workflows share some dependencies. I'd like to define multiple
scopes, and then bind into that scope.

If I make multiple bindings, each with the different scope, I get an
exception that basically says I have duplicate bindings.

Is there a preferred way of doing this?

Thanks!

schaibaa

unread,
May 4, 2012, 3:58:31 PM5/4/12
to ninject
I changed to InCallScope briefly and that worked for most things, but
there's an area where I need to use IResoultionRoot.Get(type) -- and I
don't think that is supported with InCallScope..

Thanks in advance

schaibaa

unread,
May 8, 2012, 6:11:08 PM5/8/12
to ninject
Excellent Remo, I will give this a shot.  Your advice is most
appreciated.  I was unaware multiple bindings could define the same
named scope!

http://stackoverflow.com/questions/10490601/ninject-services-needed-in-multiple-named-scopes
Reply all
Reply to author
Forward
0 new messages