IWeatherService 接口
- 程序集
- ClassIsland.Core.dll
天气服务。
public interface IWeatherService
属性
IsWeatherRefreshed
天气是否已经刷新
bool IsWeatherRefreshed { get; set; }
属性值
WeatherStatusList
天气状态列表
List<XiaomiWeatherStatusCodeItem> WeatherStatusList { get; set; }
属性值
方法
GetCitiesByName(string)
按省份和城市名搜索城市
Task<List<City>> GetCitiesByName(string name)
参数
name
string搜索字符串
返回
GetWeatherTextByCode(string)
根据天气代码获得天气名称
string GetWeatherTextByCode(string code)
参数
code
string天气代码
返回
- string
对应的天气名称。如果不存在,则返回“未知”。
QueryWeatherAsync()
立刻查询天气
Task QueryWeatherAsync()