Пример #1
0
 // Constructor allows installing any propulsion method
 // that implements IPropulsion. This is "constructor injection."
 internal Robosnake(IPropulsion propulsionMethod)
 {
     // Now the snake will have the given propulsion method.
     _propel = propulsionMethod;
 }
Пример #2
0
 // Constructor allows installing any propulsion method
 // that implements IPropulsion. This is "constructor injection."
 internal Robosnake(IPropulsion propulsionMethod)
 {
   // Now the snake will have the given propulsion method.
   _propel = propulsionMethod;
 }