Beispiel #1
0
 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()}")));
 }
Beispiel #2
0
 public override IAsyncActionWithProgress <HttpProgress> PopulateAsync()
 => MyHttpClient.GetJsonAsync(new Uri(Config.ApiUri, $"/user/{Id}"), this);