Пример #1
0
 public static IWeatherDataService GetWeatherDataService(string OPEN_WEATHER_MAP)
 {
     if (OPEN_WEATHER_MAP.Equals("OPEN_WEATHER_MAP"))
     {
         return(WeatherMap.Instance());
     }
     return(new WeatherData());
 }
 public static WeatherDataServiceFactory getWeatherDataService(String Source)
 {
     try
     {
         if (Source.Equals(OPEN_WEATHER_MAP))
         {
             return(WeatherMap.Instance());
         }
         else
         {
             throw new WeatherDataException("Invalid Weather Service!");
         }
     }
     finally { }
 }