Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Updated readme

  • Loading branch information...
commit 67312f9ec21c43411f0e4f7e0495a41c38ba07c5 1 parent f58cf43
@remogloor remogloor authored
Showing with 1 addition and 41 deletions.
  1. +1 −41 readme.txt
42 readme.txt
@@ -1,41 +1 @@
-This Ninject extension allows that child kernels can be defined. A child kernel is a
-Ninject kernel that has a parent kernel. All requests that it cant resolve are passed
-to the parent kernel.
-- Objects that are resolved by the parent kernel can not have any dependency to an object
- defined on a child kernel. This is by design. Otherwise it would be possible to access
- objects on another child kernel if the object is defined as singleton.
-- The default behavior of Ninject that classes are bound to themself if not explicit exists
- is still exists. But in this case this will be done by the top most parent. This means that
- this class can not have any dependency defined on a child kernel. I strongly suggest to
- have a binding for all objects that are resolved by ninject and not to use this default behavior.
-public class Foo
- public Foo(IBar bar)
- {
- this.Bar = bar;
- }
- public IBar Bar { get; private set; }
-public class Bar
-var parentKernel = new StandardKernel();
-var childKernel1 = new ChildKernel(this.parentKernel);
-var childKernel1 = new ChildKernel(this.parentKernel);
-var foo1 = childKernel1.Get<Foo>();
-var foo2 = childKernel2.Get<Foo>();
-var foo3 = childKernel1.Get<Foo>();
-In this example foo1 and foo2 will be different instances. foo1 and foo3 is the same instance. And all share the same bar.
+This Ninject extension allows to create factory implementations automatically.

0 comments on commit 67312f9

Please sign in to comment.
Something went wrong with that request. Please try again.