static void Main(string[] args) { #region BuilderClass Client client = new Client.ClientBuilder(). SetFirstName("Lorem"). SetLastName("Impsum"). SetZipCode("220102"). SetWallet(155). SetTown("Minsk"). SetStreet("Angharskaya"). SetHomeNumber(8). BuildClient(); Console.WriteLine(client); #endregion #region StandartBuilder IShopBuilder shopBuilder = new ShopBuilderCompany(); ShopDirector shopDirector = new ShopDirector(shopBuilder); shopDirector.BuildShop(); Shop shop = shopDirector.GetShop(); Console.WriteLine(shop); #endregion }
static void Main(string[] args) { var shopDirectory = new ShopDirector(); var carBuilder = new CarBuilder(); shopDirectory.CreateVehicle(carBuilder); var car = carBuilder.Vehicle; car.Print(); var scooterBuilder = new ScooterBuilder(); shopDirectory.CreateVehicle(scooterBuilder); var scooter = scooterBuilder.Vehicle; scooter.Print(); Console.ReadLine(); }