public static void Main(string[] args) { var computer = new ComputerBuilder() .BuildProcessor() .WithName("O7") .WithClock(2.7m) .WithCache(4m) .Add() .BuildMemory() .WithCapacity(8, MemoryUnit.GB) .WithType(MemoryType.PCR4) .Add() .BuildMemory() .WithCapacity(8, MemoryUnit.GB) .WithType(MemoryType.PCR4) .Add() .BuildStorage() .WithCapacity(256, StorageUnit.GB) .WithType(StorageType.SolidDrive) .Add() .BuildStorage() .WithCapacity(1, StorageUnit.TB) .WithType(StorageType.HardDrive) .Add() .Build(); Display(computer); }
public StorageBuilder(ComputerBuilder computerBuilder) { _computerBuilder = computerBuilder; }
public ProcessorBuilder(ComputerBuilder computerBuilder) { _computerBuilder = computerBuilder; }
public MemoryBuilder(ComputerBuilder computerBuilder) { _computerBuilder = computerBuilder; }