public void Construct(IComputerBuilder computerBuilder)
 {
     computerBuilder.BuildCase();
     computerBuilder.BuildMotherboard();
     computerBuilder.BuildVideoCard();
     computerBuilder.BuildSoundCard();
     computerBuilder.BuildPowerSupply();
     computerBuilder.BuildCPU();
     computerBuilder.BuildRAM();
     computerBuilder.BuildHardDrive();
     computerBuilder.BuildOpticalDrive();
     computerBuilder.BuildCoolingDevice();
     computerBuilder.BuildCables();
     computerBuilder.BuildMonitor();
     computerBuilder.BuildKeyboard();
     computerBuilder.BuildMouse();
     computerBuilder.BuildOS();
     computerBuilder.BuildOffice();
 }
コード例 #2
0
 /// <summary>
 /// Builds a computer based on a ComputerBuilder
 /// </summary>
 /// <param name="builder">The type of ComputerBuilder to build this computer off of</param>
 public static void Construct(IComputerBuilder builder)
 {
     builder.BuildMotherboard();
     builder.BuildHardDrive();
     builder.BuildCase();
 }