Akka.Dispatch.ActorTaskScheduler.TryUnwrapAggregateException C# (CSharp) Method

TryUnwrapAggregateException() private static method

private static TryUnwrapAggregateException ( AggregateException aggregateException ) : Exception
aggregateException AggregateException
return System.Exception
        private static Exception TryUnwrapAggregateException(AggregateException aggregateException)
        {
            if (aggregateException == null)
                return null;

            if (aggregateException.InnerExceptions.Count == 1)
                return aggregateException.InnerExceptions[0];

            return aggregateException;
        }
    }