internal static string ExportToXml(IEnumerable <IFragment> fragments) { StringBuilder xmlStringBuider = new StringBuilder(); ExportToXml exportToXml = new ExportToXml((f) => new StringWriter(xmlStringBuider), DataBlockScanner, new DefaultDetectorFormatter()); using (IDataReaderPool dataReaderPool = _container.Resolve <IDataReaderPool>()) { exportToXml.Export(fragments, dataReaderPool, "<path>", MockRepository.GenerateStub <IProgressReporter>()); return(xmlStringBuider.ToString()); } }
static void Main(string[] args) { ExportToXml first = new ExportToXml("first.xml", "first.txt"); first.Export(); ExportToXml second = new ExportToXml("second.xml", "second.txt"); second.Export(); ExportToXml third = new ExportToXml("third.xml", "third.txt"); third.Export(); }