private void AppendHtmlMessageDetails(StringBuilder message, IIntegrationResult result) { StringWriter buffer = new StringWriter(); using (XmlIntegrationResultWriter integrationWriter = new XmlIntegrationResultWriter(buffer)) { integrationWriter.Write(result); } XPathDocument xml = new XPathDocument(new StringReader(buffer.ToString())); message.Append(new BuildLogTransformer().TransformResultsWithAllStyleSheets(xml)); }
public void Run(IIntegrationResult result) { // only deal with known integration status if (result.Status == IntegrationStatus.Unknown) return; string LogFileName = this.GetFilename(result); string LogDirectory = this.LogDirectory(result.ArtifactDirectory); result.AddIntegrationProperty("CCNetLogFilePath", Path.Combine(LogDirectory, LogFileName)); using (XmlIntegrationResultWriter integrationWriter = new XmlIntegrationResultWriter(CreateWriter(LogDirectory, LogFileName))) { integrationWriter.Formatting = Formatting.Indented; integrationWriter.Write(result); } }
protected override bool Execute(IIntegrationResult result) { // only deal with known integration status if (result.Status == IntegrationStatus.Unknown) return true; using (XmlIntegrationResultWriter integrationWriter = new XmlIntegrationResultWriter(CreateWriter(LogDirectory(result.ArtifactDirectory), GetFilename(result)))) { integrationWriter.Formatting = Formatting.Indented; integrationWriter.Write(result); } result.BuildLogDirectory = LogDirectory(result.ArtifactDirectory); return true; }
/// <summary> /// Executes the specified result. /// </summary> /// <param name="result">The result.</param> /// <returns></returns> /// <remarks></remarks> protected override bool Execute(IIntegrationResult result) { // only deal with known integration status if (result.Status == IntegrationStatus.Unknown) { return(true); } result.BuildLogDirectory = LogDirectory(result.ArtifactDirectory); using (XmlIntegrationResultWriter integrationWriter = new XmlIntegrationResultWriter(CreateWriter(LogDirectory(result.ArtifactDirectory), GetFilename(result)))) { integrationWriter.Formatting = Formatting.Indented; integrationWriter.Write(result); } return(true); }
public void Run(IIntegrationResult result) { // only deal with known integration status if (result.Status == IntegrationStatus.Unknown) { return; } string LogFileName = this.GetFilename(result); string LogDirectory = this.LogDirectory(result.ArtifactDirectory); result.AddIntegrationProperty("CCNetLogFilePath", Path.Combine(LogDirectory, LogFileName)); using (XmlIntegrationResultWriter integrationWriter = new XmlIntegrationResultWriter(CreateWriter(LogDirectory, LogFileName))) { integrationWriter.Formatting = Formatting.Indented; integrationWriter.Write(result); } }
private void AppendHtmlMessageDetails(StringBuilder message, IIntegrationResult result) { StringWriter buffer = new StringWriter(); using (XmlIntegrationResultWriter integrationWriter = new XmlIntegrationResultWriter(buffer)) { integrationWriter.Write(result); } XPathDocument xml = new XPathDocument(new StringReader(buffer.ToString())); if (xslFiles == null) { message.Append(new BuildLogTransformer().TransformResultsWithAllStyleSheets(xml)); } else { message.Append(new BuildLogTransformer().TransformResults(xslFiles,xml )); } }
protected void SetUp() { buffer = new StringWriter(); writer = new XmlIntegrationResultWriter(buffer); result = IntegrationResultMother.CreateSuccessful(); }
private string toXml(IIntegrationResult result) { StringWriter xmlResultString = new StringWriter(); XmlIntegrationResultWriter writer = new XmlIntegrationResultWriter(xmlResultString); writer.Write(result); return xmlResultString.ToString(); }