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