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(); }
public AppContext(Action <object> debugAction, InjectorBuilder injectorBuilder) : base(debugAction, injectorBuilder) { }