Exemple #1
0
        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);
            }
        }
Exemple #2
0
        private void OnPlaneSpotted(JetFighter jetFighter)
        {
            JetFighter spottedPlane = jetFighter;

            Console.WriteLine(spottedPlane.Name);
        }
Exemple #3
0
 public void ISawThis(JetFighter jetFighter)
 {
     jetFighter.SpotPlane(jetFighter);
 }