예제 #1
0
        static void Main()
        {
            AbstractBuilder abstractBuilder = new ABuilder();
            Product         product         = abstractBuilder.GetProduct();

            product.Print();
        }
예제 #2
0
 static Building MakeHouse(ABuilder builder)
 {
     Console.WriteLine("HOUSE START:");
     builder.MakeRoof();
     builder.MakeWalls();
     builder.MakeFloor();
     Console.WriteLine("HOUSE END:");
     return(builder.GetBuilding());
 }
예제 #3
0
 static Building MakeMansion(ABuilder builder)
 {
     Console.WriteLine("MANSION START:");
     builder.MakeRoof();
     builder.MakeWalls();
     builder.MakeFloor();
     builder.MakeRoof();
     builder.MakeWalls();
     builder.MakeFloor();
     builder.MakeRoof();
     builder.MakeWalls();
     builder.MakeFloor();
     builder.MakeRoof();
     builder.MakeWalls();
     builder.MakeFloor();
     Console.WriteLine("MANSION END:");
     return(builder.GetBuilding());
 }