elisgugu
unread,May 8, 2012, 3:14:09 AM5/8/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ninject
Hello,
I am newbie in Ninject and IoC and I want to understand how to use it
properly.
I need to use XML configuration for creating my objects (this is a
requirement) and I done that. But I need to use WeakEventMessageBorker
too. So when create objects by the code (not with XML config file) the
events are wired together and everything works perfect. When create
objects and load XML file the events are not wired.
My xml file looks like basic.xml from the Ninject.Extension.Xml.Test
project:
<module name="basicTest">
<bind name="myObject"
service="MyNamespace.IService, MyProjectName"
to="MyNamespace.MyService, MyProjectName" />
</module>
, and class form code behind
public override void Load()
{
Bind<IService>().To<MyService>();
}
So what is the difference from both object created by xml config file
and from code behind?
I know that Ninject`s goal is to restrict using of xml, but is there
any chance to use Ninject.Extension.Xml and WeakEventMessageBorker
together?
Thanks in advance