Neo4jClient.AggregateExceptionExtensions.TryUnwrap C# (CSharp) Method

TryUnwrap() static private method

static private TryUnwrap ( this ex, Exception &exception ) : bool
ex this
exception System.Exception
return bool
        internal static bool TryUnwrap(this AggregateException ex, out Exception exception)
        {
            ex = ex.Flatten();
            if (ex.InnerExceptions.Count() == 1)
            {
                exception = ex.InnerExceptions.Single();
                return true;
            }
            exception = null;
            return false;
        }
AggregateExceptionExtensions