Skip to content

Commit

Permalink
* CompilerError.cs: Use fields not properties, and remove unneeded fi…
Browse files Browse the repository at this point in the history
…nalizer

svn path=/trunk/mcs/; revision=11882
  • Loading branch information
Jackson Harper committed Feb 23, 2003
1 parent 42a2078 commit 186273f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 55 deletions.
4 changes: 4 additions & 0 deletions mcs/class/Cscompmgd/Microsoft.CSharp/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2003-02-23 Jackson Harper <jackson@latitudegeo.com>

* CompilerError.cs: Use fields not properties, and remove unneeded finalizer

2002-12-15 Jackson Harper <jackson@latitudegeo.com>

* CompilerError.cs ErrorLevel.cs: Moved ErrorLevel enum into its own file
Expand Down
70 changes: 15 additions & 55 deletions mcs/class/Cscompmgd/Microsoft.CSharp/CompilerError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,64 +13,23 @@ namespace Microsoft.CSharp {

public class CompilerError {

private ErrorLevel level = ErrorLevel.None;
private string message = null;
private string file = null;
private int number = 0;
private int column = 0;
private int line = 0;

public CompilerError()
public ErrorLevel ErrorLevel;
public string ErrorMessage;
public string SourceFile;
public int ErrorNumber;
public int SourceColumn;
public int SourceLine;

public CompilerError ()
{
ErrorLevel = ErrorLevel.None;
ErrorMessage = String.Empty;
SourceFile = String.Empty;
ErrorNumber = 0;
SourceColumn = 0;
SourceLine = 0;
}

~CompilerError()
{
message = null;
file = null;
}


//
// Public Properties
//

public ErrorLevel ErrorLevel {
get { return level; }
set { level = value; }
}

public string ErrorMessage {
get {
return (null == message ? String.Empty : message);
}
set {
message = value;
}
}

public int ErrorNumber {
get { return number; }
set { number = value; }
}

public int SourceColumn {
get { return column; }
set { column = value; }
}

public string SourceFile {
get {
return (null == file ? String.Empty : file);
}
set { file = value; }
}

public int SourceLine {
get { return line; }
set { line = value; }
}

//
// Public Methods
//
Expand All @@ -92,6 +51,7 @@ public override string ToString()
return builder.ToString ();
}


//
// Private Properties
//
Expand Down

0 comments on commit 186273f

Please sign in to comment.