public void OnNotify(object sender, NotifyEventArgs e)
        {
            if (WriteToConsole)
            {
                Console.WriteLine(sender + ":" + e.Message);
            }

            if (e.ProgressEventType == ProgressEventType.Error ||
                (e.ProgressEventType == ProgressEventType.Warning && ThrowOnWarning))
            {
                throw new Exception(e.Message, e.Exception);
            }
        }
Beispiel #2
0
        public void OnNotify(object sender, NotifyEventArgs e)
        {
            if (e.ProgressEventType == ProgressEventType.Error && _throwOnErrorEvents)
            {
                if (e.Exception != null)
                {
                    throw e.Exception;
                }
                else
                {
                    throw new Exception(e.Message);
                }
            }


            if (!EventsReceivedBySender.ContainsKey(sender))
            {
                EventsReceivedBySender.Add(sender, new List <NotifyEventArgs>());
            }

            EventsReceivedBySender[sender].Add(e);
        }
Beispiel #3
0
 public void OnNotify(object sender, NotifyEventArgs e)
 {
     _checker.OnCheckPerformed(e.ToCheckEventArgs());
 }