示例#1
0
文件: Car.cs 项目: votrongdao/Pattern
 /// <summary>
 /// Only for example. Its bad idea - we need constructor with such parameter
 /// </summary>
 public Car()
 {
     Stereo = new Stereo();
     Engine = new Engine();
     Transmission = new Transmission();
     RocketBarrage = new RocketBarrage();
 }
示例#2
0
 public LaunchRocket(RocketBarrage rocket)
 {
     _rocket = rocket ?? new RocketBarrage();
 }