/// <summary>
 /// Rethrows the <see cref="Exception.InnerException"/> of an <see cref="AggregateException"/> if it exists,
 /// otherwise, rethrows <paramref name="aggregateException"/>.
 /// This preserves the stack trace of the exception that is rethrown, and will not include the point of rethrow.
 /// </summary>
 /// <param name="aggregateException">The captured exception.</param>
 public static void RethrowAsSingular(this AggregateException aggregateException) => aggregateException.AsSingular().Rethrow();