public override string Evaluate(WatsonReport watsonReport) { string result; try { watsonReport.PerformWerOperation(delegate(WerSafeHandle reportHandle) { DiagnosticsNativeMethods.WerReportAddFile(reportHandle, base.Expression, DiagnosticsNativeMethods.WER_FILE_TYPE.WerFileTypeOther, (DiagnosticsNativeMethods.WER_FILE_FLAGS) 0U); }); watsonReport.LogExtraFile(base.Expression); result = "Attached file \"" + Path.GetFileName(base.Expression) + "\" to report."; } catch (Exception ex) { watsonReport.LogExtraFile(this.FormatError(base.Expression, ex)); result = this.FormatError(base.Expression, ex); } return(result); }