public ExceptionFormatter(
     ExceptionLayoutsCollection exceptionLayouts,
     ExceptionExtractor extractor,
     ExceptionLayoutFormatter formatter)
 {
     _exceptionLayouts = exceptionLayouts;
     _formatter        = formatter;
     _extractor        = extractor;
 }
        public static IExceptionFormatter Create(params Assembly[] assemblies)
        {
            var exceptionLayouts = new ExceptionLayoutsCollection()
                                   .AddExceptionLayout(new ExceptionLayout());

            foreach (var assembly in assemblies)
            {
                exceptionLayouts.AddExceptionLayouts(assembly);
            }

            return(new ExceptionFormatter(
                       exceptionLayouts: exceptionLayouts,
                       extractor: new ExceptionExtractor(),
                       formatter: new ExceptionLayoutFormatter(exceptionLayouts)));
        }
Exemplo n.º 3
0
 public ExceptionLayoutFormatter(ExceptionLayoutsCollection exceptionLayouts)
 {
     _exceptionLayouts = exceptionLayouts;
 }