Пример #1
0
 protected override void StartEngine(Key key)
 {
     if (!IsKeyApproved(key))
     {
         throw new SecurityException("Invalid key");
     }
 }
Пример #2
0
 public void Start(Key key)
 {
     CheckSeat();
     CheckMirrors();
     if (BeforeStartEngine != null)
     {
         BeforeStartEngine(this, new EventArgs());
     }
     StartEngine(key);
 }
Пример #3
0
 protected override void StartEngine(Key key)
 {
     Debug.WriteLine("Hand cranking car to start");
 }
Пример #4
0
 protected abstract void StartEngine(Key key);
Пример #5
0
 protected bool IsKeyApproved(Key key)
 {
     return key.KeySignature == keySignature;
 }