mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
simplify prop value extraction
This commit is contained in:
parent
9e9bb5ebfd
commit
821a0ec0d2
1 changed files with 2 additions and 2 deletions
|
|
@ -24,8 +24,8 @@ public async Task<IEnumerable<Uri>> GetAllAsync<TModel>()
|
|||
var request = new RestRequest(endpoint);
|
||||
var response = await _apiClient.ExecuteAsync<IEnumerable<TModel>>(request);
|
||||
return response.SelectMany(r =>
|
||||
r.GetType().GetProperties().Where(p => p.GetType() == typeof(Uri)).Select(p => (Uri)p.GetValue(r)))
|
||||
.Where(u => u != null);
|
||||
r.GetType().GetProperties().Where(p => p.GetType() == typeof(Uri) && p.GetValue(r) != null)
|
||||
.Select(p => (Uri)p.GetValue(r)));
|
||||
}
|
||||
|
||||
private static string BuildEndpoint<TModel>()
|
||||
|
|
|
|||
Loading…
Reference in a new issue