示例#1
0
文件: Program.cs 项目: Opentany/Tech
 public override void Remove(Component component)
 {
     _children.Remove(component);
 }
示例#2
0
 public Computer(Component CPU, Component GPU, Component Mobo, Component Disk, Component PSU, Component Case, Component RAM)
 {
     this.RAM = RAM;
     this.Processor = CPU;
     this.GPU = GPU;
     this.Motherboard = Mobo;
     this.Disk = Disk;
     this.Case = Case;
     this.PSU = PSU;
     this.Price = this.Processor.Price + this.GPU.Price + this.Motherboard.Price + this.Disk.Price +
                  this.PSU.Price + this.RAM.Price + this.Case.Price;
 }
示例#3
0
文件: Program.cs 项目: Opentany/Tech
 public override void Add(Component component)
 {
     _children.Add(component);
 }
示例#4
0
文件: Program.cs 项目: Opentany/Tech
 public abstract void Remove(Component c);
示例#5
0
文件: Program.cs 项目: Opentany/Tech
 public abstract void Add(Component c);
示例#6
0
文件: Program.cs 项目: Opentany/Tech
 public override void Remove(Component c)
 {
     Console.WriteLine("Cannot remove from a leaf");
 }
示例#7
0
文件: Program.cs 项目: Opentany/Tech
 public override void Add(Component c)
 {
     Console.WriteLine("Cannot add to a leaf");
 }