static void Init(IList <Attribute> customReporters) { defaultProcessors = new IResultsProcessor[customReporters.Count + 1]; for (var index = 0; index < customReporters.Count; index++) { var customReporter = (ConventionReporterAttribute)customReporters[index]; var resultsProcessor = (IResultsProcessor)Activator.CreateInstance(customReporter.ReporterType); defaultProcessors[index] = resultsProcessor; } var conventionReportTraceRenderer = new ConventionReportTraceRenderer(); defaultProcessors[defaultProcessors.Length - 1] = conventionReportTraceRenderer; }
static void Init(Assembly assembly) { var customReporters = assembly.GetCustomAttributes(typeof(ConventionReporterAttribute), false); defaultProcessors = new IResultsProcessor[customReporters.Length + 1]; for (var index = 0; index < customReporters.Length; index++) { var customReporter = (ConventionReporterAttribute)customReporters[index]; var resultsProcessor = (IResultsProcessor)Activator.CreateInstance(customReporter.ReporterType); defaultProcessors[index] = resultsProcessor; } var conventionReportTraceRenderer = new ConventionReportTraceRenderer(); defaultProcessors[defaultProcessors.Length - 1] = conventionReportTraceRenderer; }