public void SpotPlane(JetFighter jetFighter) { try { if (string.Equals(jetFighter.Name, "UFO")) { throw new Exception("UFO Found"); } this.planeSpotted.OnNext(jetFighter); } catch (Exception exception) { this.planeSpotted.OnError(exception); } }
private void OnPlaneSpotted(JetFighter jetFighter) { JetFighter spottedPlane = jetFighter; Console.WriteLine(spottedPlane.Name); }
public void ISawThis(JetFighter jetFighter) { jetFighter.SpotPlane(jetFighter); }