2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 13:33:13 +00:00

Query Resource

This commit is contained in:
2019-12-07 06:01:23 +03:00
parent f66a809836
commit 128972bb74
5 changed files with 21 additions and 17 deletions

View File

@ -297,7 +297,7 @@ namespace Esyur.Resource
public static async Task<IResource[]> Query(string path)
public static async AsyncReply<IResource[]> Query(string path)
{
var rt = new AsyncReply<IResource[]>();
@ -386,11 +386,11 @@ namespace Esyur.Resource
}
Query(path).ContinueWith(rs =>
Query(path).Then(rs =>
{
// rt.TriggerError(new Exception());
if (rs.Result != null && rs.Result.Length > 0)
rt.Trigger(rs.Result[0]);
if (rs != null && rs.Length > 0)
rt.Trigger(rs.First());
else
rt.Trigger(null);
});