Esempio n. 1
0
        public WeatherData FetchWeather()
        {
            WeatherData data = null;

            data = m_weatherinfo.GetInformation();//fetches and returns the data

            return(data);
        }
        public WeatherData GetInformation()
        {
            WeatherData data = null;

            data = GetInfo();
            if (data == null)
            {
                data = m_weatherinfo.GetInformation();//call next in chain if required
            }
            return(data);
        }
        public WeatherData GetInformation()
        {
            WeatherData data = null;

            //call local function to see if we can get weather info
            data = GetInfo();
            //if local function cannot process this, hand it over to next actor in the chain
            if (data == null)
            {
                data = m_weatherinfo.GetInformation();
            }
            return(data);
        }