private void Awake()
        {
            _precomposed = new PrecomposeDependency("test1");

            _contextTest = Context.Create("test")
                           .RegisterDependency(_precomposed)
                           .RegisterType <AutocomposeDependency>()
                           .RegisterTypeAs <DependencyImpl, IDependency>();

            _contextBase = Context.Create("base")
                           .SetParentContext("test")
                           .RegisterDependency(new PrecomposeDependency("base"))
                           .RegisterType <AutocomposeDependency>()
                           .RegisterDependency(_recipient);
        }
 public AutocomposeDependency(PrecomposeDependency dep)
 {
     _dep = dep;
 }
Exemplo n.º 3
0
 public MyCustomComposition(AutocomposeDependency a, PrecomposeDependency b)
 {
     Dependency1 = a;
     Dependency2 = b;
 }