Exemplo n.º 1
0
 internal void WriteResult(WatsonReport watsonReport, XmlWriter writer)
 {
     using (SafeXmlTag safeXmlTag = new SafeXmlTag(writer, "action").WithAttribute("type", this.ActionName))
     {
         try
         {
             safeXmlTag.SetContent(this.Evaluate(watsonReport));
         }
         catch (Exception ex)
         {
             watsonReport.RecordExceptionWhileCreatingReport(ex);
             safeXmlTag.SetContent(string.Concat(new string[]
             {
                 "Exception thrown while evaluating action \"",
                 this.ActionName,
                 "\" (expression: ",
                 this.Expression,
                 "):\r\n",
                 ex.ToString()
             }));
         }
     }
 }