mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-11-02 16:41:35 +00:00
2.2
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user