2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-11-02 16:41:35 +00:00
This commit is contained in:
2022-03-09 21:55:30 +03:00
parent 530df018ec
commit 9a174f406f
106 changed files with 5166 additions and 4398 deletions

View File

@@ -34,10 +34,13 @@ public class AsyncBag<T> : AsyncBag
{
public AsyncBag<T> Then(Action<T[]> callback)
{
base.Then(new Action<object>((o) => callback(((object[])o).Select(x => (T)x).ToArray())));
//base.Then(new Action<object>((o) => callback(((object[])o).Select(x => (T)x).ToArray())));
base.Then(x => callback((T[])x));
return this;
}
public override Type ArrayType => typeof(T);
public void Add(AsyncReply<T> reply)
{
@@ -58,9 +61,15 @@ public class AsyncBag<T> : AsyncBag
public new T[] Wait()
{
return base.Wait().Select(x => (T)x).ToArray();
return (T[])base.Wait();// base.Wait().Select(x => (T)x).ToArray();
}
public new T[] Wait(int timeout)
{
return (T[])base.Wait(timeout);
}
public AsyncBag()
{