public void Notify(ICarObserverManager carObserverManager) { if ((carObserverManager as SomeCar).EngineState < 20) { Console.WriteLine($"BrokenEngineObserver: Engine is in bad state. It is unusable and needs fixing. Engine state: {(carObserverManager as SomeCar).EngineState}."); } }
public void Notify(ICarObserverManager carObserverManager) { if ((carObserverManager as SomeCar).EngineState < 50) { Console.WriteLine($"EngineStateObserver: Engine state has decreased. Engine state: {(carObserverManager as SomeCar).EngineState}."); } }