public virtual void Render(TextWriter writer, SageContext context)
{
Contract.Requires<ArgumentNullException>(context != null);
Contract.Requires<ArgumentNullException>(writer != null);
XmlDocument document = new XmlDocument();
XmlElement documentElement = document.AppendElement(this.ConvertToXml(this.Exception, document));
Exception inner = this.Exception.InnerException;
while (inner != null)
{
documentElement.AppendChild(this.ConvertToXml(inner, document));
inner = inner.InnerException;
}
documentElement.AppendChild(context.ToXml(document));
documentElement.SetAttribute("date", DateTime.Now.ToString("dd-MM-yyyy"));
documentElement.SetAttribute("time", DateTime.Now.ToString("hh:mm:ss"));
XsltTransform processor = XsltTransform.Create(context, this.StylesheetPath);
XmlWriter xmlwr = XmlWriter.Create(writer, processor.OutputSettings);
processor.Transform(documentElement, xmlwr, context, this.GetTransformArguments(context));
}