public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("Date: ").AppendLine(this.DateTimeOccurred.ToString()); if (TemplateFileName != null) { sb.Append("TemplateFileName: ").AppendLine(TemplateFileName); } if (TemplateIdentifier != null) { sb.Append("TemplateIdentifier: ").AppendLine(TemplateIdentifier); } sb.Append("Class: ").AppendLine(Class.ToString()); sb.Append("IsWarning: ").AppendLine(IsWarning.ToString()); sb.Append("IsRuntime: ").AppendLine(IsRuntime.ToString()); sb.Append("IsTemplateCodeSegment: ").AppendLine(IsTemplateCodeSegment.ToString()); if (ErrorNumber != null) { sb.Append("ErrorNumber: ").AppendLine(ErrorNumber); } if (ErrorType != null) { sb.Append("ErrorType: ").AppendLine(ErrorType); } if (SourceFile != null) { sb.Append("SourceFile: ").AppendLine(SourceFile); } if (SourceLine != null) { sb.Append("SourceLine: ").AppendLine(SourceLine); } sb.Append("LineNumber: ").AppendLine(LineNumber.ToString()); sb.Append("ColumnNumber: ").AppendLine(ColumnNumber.ToString()); if (Message != null) { sb.Append("Message: ").AppendLine(Message); } if (Detail != null) { sb.Append("Detail: ").AppendLine(Detail); } return(sb.ToString()); }
public override int GetHashCode () { return Code.GetHashCode () + Location.GetHashCode () + IsWarning.GetHashCode () + Text.GetHashCode (); }