public static void Handle()
{
AggregateException ex = new AggregateException();
ex = new AggregateException(new[] { new ArgumentException(), new ArgumentException(), new ArgumentException() });
int handledCount = 0;
ex.Handle((e) =>
{
if (e is ArgumentException)
{
handledCount++;
return true;
}
return false;
});
Assert.Equal(handledCount, ex.InnerExceptions.Count);
}