public static IGetWeatherRequest CreateGetWeatherRequest(GetWeatherMode mode,string args) { switch (mode) { case GetWeatherMode.City: getWeatherRequest = new GetWeatherByCityNameOrIdRequest(args); break; case GetWeatherMode.Gps: getWeatherRequest = new GetWeatherByGpsRequest(args.Split(',')[0],args.Split(',')[1]); break; case GetWeatherMode.Ip: getWeatherRequest = new GetWeatherByIpRequest(args); break; default: getWeatherRequest = new GetWeatherByCityNameOrIdRequest(args); break; } return getWeatherRequest; }
public static IGetWeatherRequest CreateGetWeatherRequest(GetWeatherMode mode, string args) { switch (mode) { case GetWeatherMode.City: getWeatherRequest = new GetWeatherByCityNameRequest(args); break; case GetWeatherMode.CityId: getWeatherRequest = new GetWeatherByCityIdRequest(args); break; case GetWeatherMode.CityIp: getWeatherRequest = new GetWeatherByIpRequest(args); break; default: getWeatherRequest = new GetWeatherByCityIdRequest(args); break; } return getWeatherRequest; }
public static IGetWeatherRequest CreateGetWeatherRequest(GetWeatherMode mode, string args) { switch (mode) { case GetWeatherMode.City: getWeatherRequest = new GetWeatherByCityNameRequest(args); break; case GetWeatherMode.CityId: getWeatherRequest = new GetWeatherByCityIdRequest(args); break; case GetWeatherMode.CityIp: getWeatherRequest = new GetWeatherByIpRequest(args); break; default: getWeatherRequest = new GetWeatherByCityIdRequest(args); break; } return(getWeatherRequest); }