コード例 #1
0
        public static void FatalException(this ILogEnd log, Exception e)
        {
            log.Fatal(e);
            var ae = e as AggregateException;

            if (ae != null)
            {
                foreach (var _e in ae.InnerExceptions)
                {
                    log.FatalException(_e);
                }
            }
        }
コード例 #2
0
 public static async Task WaitAllAsync(this List <Task> tasks, ILogEnd log = null)
 {
     try
     {
         await Task.WhenAll(tasks.ToArray());
     }
     catch (Exception e)
     {
         if (log == null)
         {
             throw;
         }
         else
         {
             log.FatalException(e);
         }
     }
 }
コード例 #3
0
 public static void WaitAll(this List <Task> tasks, ILogEnd log = null)
 {
     try
     {
         Task.WaitAll(tasks.ToArray());
     }
     catch (Exception e)
     {
         if (log == null)
         {
             throw;
         }
         else
         {
             log.FatalException(e);
         }
     }
 }