public WeatherRequestWWO(WeatherInput future, WeatherInput past = null, RefreshType reftype = RefreshType.FullRefresh)
 {
     m_info_future     = future;
     m_info_historical = past;
     m_reftype         = reftype;
     m_weatherinfo     = new WeatherNullPtr();//This is a NUll PTr Pattern so that there would always be a next actor and not a null pointer
 }
 public WeatherRequestZOWA(WeatherInput future, WeatherInput past = null, RefreshType reftype = RefreshType.FullRefresh)
 {
     m_info_future     = future;
     m_info_historical = past;
     m_reftype         = reftype;
     m_weatherinfo     = new WeatherNullPtr();
 }
Example #3
0
        void BuildResponsibilityChain()
        {
            //Chain of responsibility pattern where 2 classes are given responsibility to collect Weather data
            IGetWetherInfo first  = new WeatherRequestWWO(m_info_future, m_info_historical, m_reftype);
            IGetWetherInfo second = new WeatherRequestZOWA(m_info_future, m_info_historical, m_reftype);

            first.SetNextChain(second);
            m_weatherinfo = first;
        }
 public void SetNextChain(IGetWetherInfo next)
 {
     m_weatherinfo = next;
 }
 public void SetNextChain(IGetWetherInfo next)
 {
     m_weatherinfo = new WeatherNullPtr();
 }