Josh where we should continue this ?Here ? in uNhAddInsList ? in private ? I'm a bit confused.
Btw the problem, may be, is only the order of the IoC component registration. The static class of the example is only for that Console application example. 2009/6/25 joshlrogers <[email protected]> > > Fabio, > > I am running into a very strange problem. I have gotten the CpBT to > work successfully in unit tests. However when I added CpBT to the > main code base it now won't work even though the UnitTests are using > the exact same ServiceLocatorProvider configuration and they are in > the same solution. I thought it was references but they match > perfectly between projects. > > I don't know what I can post here to help you understand the problem > other than the exception: > > {"Activation error occured while trying to get instance of type > IJobDal, key \"\""} inner exception of: > {"ComponentActivator: could not proxy TEAMSData.DALs.JobDal"} inner > exception of: > {"ComponentActivator: could not instantiate > uNhAddIns.SessionEasier.Conversations.NhConversationsContainerAccessor"} > with a message of: > "ComponentActivator: could not proxy TEAMSData.DALs.JobDal" > > I am getting the instance through this command: > > IJobDal test = ServiceLocator.Current.GetInstance<IJobDal>(); > > Using the exact same line in the unit tests work just fine. > > I hope you can help. > > Thanks, > Josh > > > On Jun 24, 10:16 am, Fabio Maulo <[email protected]> wrote: > > 2009/6/24 Josh Rogers <[email protected]> > > > > > My struction is this: > > > > > winForm -> Logic Layer -> DAL -> NH -> DB > > > > > I am sure the CpBT would work perfectly for me, I have no doubt that > you > > > know exactly what your talking about, the problem is I can't understand > when > > > or how to use it. > > > > Well... that is very similar to the architecture of Gustavo's > example.winForm > > -> Presenter -> Model -> Dao -> NH -> DB > > In your case you only need to call the ServiceLocator to have an instance > of > > what you have named "Logic Layer" after that the implementation of AOP > (so > > far Castle or Spring) will do what is needed. > > The uNhAddIns group ishttp://groups.google.com/group/unhaddins > > > > Another very simple example, in a console instead winForm (I'm sorry but > > would maintain my work in the back-end), is available > > here< > http://code.google.com/p/unhaddins/source/browse/#svn/trunk/uNhAddIns...> > > . > > > > -- > > Fabio Maulo > > > -- Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" 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/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
