From be4d25d4c67d630f593a1ace6102f261164b729e Mon Sep 17 00:00:00 2001 From: Simon Whittemore Date: Wed, 12 May 2010 17:29:12 +0100 Subject: [PATCH] Using built-in ResourceXmlReader to load xslt --- .../TestExecutionReportGenerator.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Reporting/TestExecutionReport/TestExecutionReportGenerator.cs b/Reporting/TestExecutionReport/TestExecutionReportGenerator.cs index f18613a6a..26e9ec866 100644 --- a/Reporting/TestExecutionReport/TestExecutionReportGenerator.cs +++ b/Reporting/TestExecutionReport/TestExecutionReportGenerator.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Text; +using System.Reflection; using System.Xml; using System.Xml.Linq; using System.Xml.Xsl; @@ -13,10 +8,9 @@ namespace TechTalk.SpecFlow.Reporting.TestExecutionReport public class TestExecutionReportGenerator { public void GenerateNUnitXmlFromGallio(string xmlTestResult) - { - Assembly asm = Assembly.GetExecutingAssembly(); - Stream rsrc = asm.GetManifestResourceStream("TechTalk.SpecFlow.Reporting.TestExecutionReport.Gallio2NUnit.xslt"); - XmlTextReader xmlTextReader = new XmlTextReader(rsrc); + { + XmlTextReader xmlTextReader = new ResourceXmlReader(Assembly.GetExecutingAssembly(), + "TechTalk.SpecFlow.Reporting.TestExecutionReport.Gallio2NUnit.xslt"); XDocument doc = XDocument.Load(xmlTestResult); var tranny = new XslCompiledTransform();