Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public AutocomposeDependency(PrecomposeDependency dep)
 {
     _dep = dep;
 }
Ejemplo n.º 3
0
 public MyCustomComposition(AutocomposeDependency a, PrecomposeDependency b)
 {
     Dependency1 = a;
     Dependency2 = b;
 }