Made all Enums serializable and corrected some class declarations.
[mono.git] / mcs / ilasm / Report.cs
1 //
2 // Mono.ILASM.Report
3 //
4 // Author(s):
5 //  Jackson Harper (Jackson@LatitudeGeo.com)
6 //
7 // (C) 2003 Jackson Harper, All rights reserved
8 //
9
10
11 using System;
12 using System.IO;
13
14 namespace Mono.ILASM {
15
16         public class Report {
17
18                 private int error_count;
19                 private int mark_count;
20                 private bool quiet;
21
22                 public Report () : this (false)
23                 {
24
25                 }
26
27                 public Report (bool quiet)
28                 {
29                         this.error_count = 0;
30                         this.quiet = quiet;
31                 }
32
33                 public int ErrorCount {
34                         get { return error_count; }
35                 }
36
37                 public void AssembleFile (string file, string listing,
38                                           string target, string output)
39                 {
40                         if (quiet)
41                                 return;
42
43                         Console.WriteLine ("Assembling '{0}' , {1}, to {2} --> '{3}'", file,
44                                            GetListing (listing), target, output);
45                 }
46
47                 public void Error (string message)
48                 {
49                         error_count++;
50                         Console.WriteLine ("Error: " + message);
51                 }
52
53                 private string GetListing (string listing)
54                 {
55                         if (listing == null)
56                                 return "no listing file";
57                         return listing;
58                 }
59
60         }
61
62 }
63