/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns> /// <inheritdoc /> public override int GetHashCode() { unchecked { var hashCode = FileName != null?FileName.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (int)FileSize; hashCode = (hashCode * 397) ^ ImageBase.GetHashCode(); hashCode = (hashCode * 397) ^ IsManaged.GetHashCode(); hashCode = (hashCode * 397) ^ IsRuntime.GetHashCode(); hashCode = (hashCode * 397) ^ (Pdb != null ? Pdb.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PeFile != null ? PeFile.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (int)TimeStamp; hashCode = (hashCode * 397) ^ Version.GetHashCode(); return(hashCode); } }
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()); }