|
| 1 | +using System.Data; |
1 | 2 | using System.Runtime.InteropServices; |
2 | | -using System.Text.Json; |
3 | 3 | using Windows.Win32.Foundation; |
4 | 4 | using Windows.Win32.Storage.FileSystem; |
5 | 5 | using static deadlock_dotnet_sdk.Domain.NativeMethods; |
@@ -110,6 +110,30 @@ private unsafe string TryGetFinalPath() |
110 | 110 |
|
111 | 111 | public override string ToString() |
112 | 112 | { |
113 | | - return JsonSerializer.Serialize(this, options: new() { WriteIndented = true }); |
| 113 | + string[] exLog = ExceptionLog.Cast<string>().ToArray(); |
| 114 | + for (int i = 0; i < exLog.Length; i++) |
| 115 | + { |
| 116 | + exLog[i] = $" {exLog[i]}".Replace("\n", "\n "); |
| 117 | + } |
| 118 | + |
| 119 | + return @$"{GetType().Name} hash:{GetHashCode()} |
| 120 | + {nameof(CreatorBackTraceIndex)} : {CreatorBackTraceIndex} |
| 121 | + {nameof(FileFullPath)} : {FileFullPath} |
| 122 | + {nameof(IsDirectory)} : {IsDirectory} |
| 123 | + {nameof(FileName)} : {FileName} |
| 124 | + {nameof(GrantedAccess)} : {GrantedAccess} |
| 125 | + {nameof(handle)} : {handle} |
| 126 | + {nameof(HandleObjectType)} : {HandleObjectType} |
| 127 | + {nameof(HandleValue)} : {HandleValue} |
| 128 | + {nameof(IsClosed)} : {IsClosed} |
| 129 | + {nameof(IsFileHandle)} : {IsFileHandle} |
| 130 | + {nameof(IsInvalid)} : {IsInvalid} |
| 131 | + {nameof(Object)} : {Object} |
| 132 | + {nameof(ProcessCommandLine)} : {ProcessCommandLine} |
| 133 | + {nameof(ProcessId)} : {ProcessId} |
| 134 | + {nameof(ProcessMainModulePath)} : {ProcessMainModulePath} |
| 135 | + {nameof(ProcessName)} : {ProcessName} |
| 136 | + {nameof(ExceptionLog)} : ... |
| 137 | + " + exLog; |
114 | 138 | } |
115 | 139 | } |
0 commit comments