Beispiel #1
0
        public CarFacade()
        {
            tires     = new Tires();
            subEngine = new SubEngine();
            body      = new Body();

            // Handle the injection, in some cases these dependencies and injection are complexed.
            // So handling everything in the facade makes it easer for client.
            engine = new Engine(subEngine);
        }
 public Engine(SubEngine subEngine)
 {
     this.subEngine = subEngine;
 }