private static void BuilderPatterDemo() { AbstractMountainBike mountainBike = new Downhill(BikeColor.Green, new Widewheel(24)); BikeBuilder builder = new MountainBikeBuilder(mountainBike); //builde object BikeDirector director = new MountainBikeDirector(); // diector object IBicycle bicycle = director.Build(builder); // interface object Console.WriteLine(bicycle); }
private static void BuilderPatternDemo() { AbstractMountainBike mountainBike = new DownHill(BikecColor.Green, new WideWheel(24)); BikeBulder builder = new MountainBiekeBulder(mountainBike); BikeDirector director = new MountainBikeDirector(); IBycycle bycycle = director.Bulid(builder); Console.WriteLine(bycycle); }