public static IAsyncOperationWithProgress <User, HttpProgress> FetchAsync(string userName) { if (string.IsNullOrWhiteSpace(userName)) { throw new ArgumentException("用户名或 UID 不能为空"); } return(MyHttpClient.GetJsonAsync <User>(new Uri(Config.ApiUri, $"/user/{userName.Trim()}"))); }
public override IAsyncActionWithProgress <HttpProgress> PopulateAsync() => MyHttpClient.GetJsonAsync(new Uri(Config.ApiUri, $"/user/{Id}"), this);