Ejemplo n.º 1
0
        /// <summary>
        /// Loads the bug.
        /// </summary>
        /// <param name="fileName">Name of the file.</param>
        void LoadBug(string fileName)
        {
            BugFile.Text = fileName;
            BugDocument xml = new BugDocument();

            xml.Load(fileName);
            CurrentContext = ReBugContext.Create(xml);
            ContextExplorer.SelectedObject = new PropertyGridInspector(CurrentContext);
            ReBug.Enabled = true;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Builds the report.
        /// </summary>
        /// <param name="fileName">Name of the file.</param>
        /// <param name="context">The context.</param>
        static void BuildReport(string fileName, HttpContext context)
        {
            context.Response.ContentType = "text/html";
            XslCompiledTransform xsl = new XslCompiledTransform();

            using (Stream xslFile = XslFile)
                using (XmlWriter writer = new XmlTextWriter(context.Response.Output))
                {
                    BugDocument bug = new BugDocument();
                    bug.Load(fileName);
                    xsl.Load(new XmlTextReader(xslFile));
                    xsl.Transform(bug, XsltExtension.RegisterExtension(), writer);
                }
        }