/// <summary> /// This method get from the user the web service that he want /// to create an object, and create a singleton object. /// </summary> /// <param name="str">The desired service.</param> /// <returns>Return an object from the type of the chosen REStful Web Service.</returns> public static WeatherData getWeatherDataService(string str) { WeatherData wd = null; if (str.Equals("OPEN_WEATHER_MAP")) { wd = WeatherDataSite1.Instance(); } else if (str.Equals("WORLD_WEATHER_ONLINE")) { wd = WeatherDataSite2.Instance(); } return(wd); }