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

added Wait

This commit is contained in:
2019-12-31 12:56:06 +03:00
parent 3375a814e6
commit ed34ae229d
4 changed files with 14 additions and 2 deletions

View File

@ -51,6 +51,11 @@ namespace Esyur.Core
return new AsyncAwaiter<object[]>(this);
}
public new object[] Wait()
{
return (object[])base.Wait();
}
public void Seal()
{

View File

@ -56,6 +56,11 @@ namespace Esyur.Core
return new AsyncAwaiter<T[]>(this);
}
public new T[] Wait()
{
return base.Wait().Select(x => (T)x).ToArray();
}
public AsyncBag()
{

View File

@ -72,7 +72,6 @@ namespace Esyur.Core
public object Wait()
{
if (resultReady)
return result;

View File

@ -75,7 +75,10 @@ namespace Esyur.Core
return new AsyncAwaiter<T>(this);
}
public new T Wait()
{
return (T)base.Wait();
}
/*
protected new List<Action> callbacks = new List<Action>();
protected new object result;