private void AppB()
        {
            var injectorBuilder = new InjectorBuilder();

            appContext = new AppContext(Debug.Log, injectorBuilder);
            injectorBuilder.Mapping <ICar, Benz>();
            ReflectionUtility.InvokeMethod(appContext, "Start",
                                           new object[] { null });

            DriveCar();
        }
        private void DependencyChain()
        {
            var injectorBuilder = new InjectorBuilder();

            appContext = new AppContext(Debug.Log, injectorBuilder);
            ReflectionUtility.InvokeMethod(appContext, "Start",
                                           new object[] { null });

            var phone = appContext.Get <Phone>(true);

            phone.Charging();
        }
예제 #3
0
 public AppContext(Action <object> debugAction,
                   InjectorBuilder injectorBuilder) : base(debugAction, injectorBuilder)
 {
 }