Example #1
0
        private void DispatchSpecificException <T>(T exception, ExceptionHandlingContext context, IQualifiers qualifiers) where T : Exception
        {
            var caught   = new CaughtException <T>(exception, context);
            var handlers = _handlerResolver.Resolve(new ObserverResolvable(caught.GetType(), qualifiers));

            foreach (var handler in handlers)
            {
                context.IsMarkedHandled = context.IsMarkedHandled ?? true;

                handler.Notify(caught);
                if (caught.IsMarkedHandled)
                {
                    break;
                }
            }
        }
Example #2
0
 public IEnumerable <EventObserverMethod> ResolveObservers(Type eventType, IQualifiers qualifiers)
 {
     return(_observerResolver.Resolve(new ObserverResolvable(eventType, qualifiers)));
 }