상속: Gendarme.ResultWriter, IDisposable
 protected override void Write()
 {
     using (XmlResultWriter writer = new XmlResultWriter(Runner, temp_filename))
     {
         writer.Report();
     }
 }
예제 #2
0
        byte Report()
        {
            // re-activate all loaded (i.e. selected) rules since some of them could have
            // turned off themselve while executing but we still want them listed in the report
            foreach (Rule rule in Rules)
            {
                rule.Active = true;
            }

            // generate text report (default, to console, if xml and html aren't specified)
            if (console || (log_file != null) || ((xml_file == null) && (html_file == null)))
            {
                using (TextResultWriter writer = new TextResultWriter(this, log_file)) {
                    writer.Report();
                }
            }

            // generate XML report
            if (xml_file != null)
            {
                using (XmlResultWriter writer = new XmlResultWriter(this, xml_file)) {
                    writer.Report();
                }
            }

            // generate HTML report
            if (html_file != null)
            {
                using (HtmlResultWriter writer = new HtmlResultWriter(this, html_file)) {
                    writer.Report();
                }
            }

            return((byte)((0 == Defects.Count) ? 0 : 1));
        }
예제 #3
0
		protected override void Write()
		{
			using (XmlResultWriter writer = new XmlResultWriter (Runner, temp_filename)) {
				writer.Report ();
			}
		}
예제 #4
0
		byte Report ()
		{
			// re-activate all loaded (i.e. selected) rules since some of them could have
			// turned off themselve while executing but we still want them listed in the report
			foreach (Rule rule in Rules) {
				rule.Active = true;
			}

			// generate text report (default, to console, if xml and html aren't specified)
			if ((log_file != null) || ((xml_file == null) && (html_file == null))) {
				using (TextResultWriter writer = new TextResultWriter (this, log_file)) {
					writer.Report ();
				}
			}

			// generate XML report
			if (xml_file != null) {
				using (XmlResultWriter writer = new XmlResultWriter (this, xml_file)) {
					writer.Report ();
				}
			}

			// generate HTML report
			if (html_file != null) {
				using (HtmlResultWriter writer = new HtmlResultWriter (this, html_file)) {
					writer.Report ();
				}
			}

			return (byte) ((0 == Defects.Count) ? 0 : 1);
		}