Skip to content

Commit 7b052c5

Browse files
committed
refactor: realign output of SafeFileHandleEx.ToString()
1 parent cbbc524 commit 7b052c5

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

deadlock-dotnet-sdk/Domain/SafeFileHandleEx.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -474,26 +474,26 @@ public string ToString(bool initProps, bool initProcessInfo)
474474
}
475475

476476
return @$"{nameof(SafeFileHandleEx)} hash:{GetHashCode()}
477-
{nameof(CreatorBackTraceIndex)} : {CreatorBackTraceIndex}
478-
{nameof(FileFullPath)} : {(initProps ? (FileFullPath.v ?? FileFullPath.ex?.ToString()) : (fileFullPath.v ?? fileFullPath.ex?.ToString()))}
479-
{nameof(FileHandleType)} : {(initProps ? (FileHandleType.v?.ToString() ?? FileFullPath.ex?.ToString()) : (fileHandleType.v?.ToString() ?? fileHandleType.ex?.ToString()))}
480-
{nameof(FileName)} : {(initProps ? (FileName.v ?? FileName.ex?.ToString()) : (fileName.v ?? fileName.ex?.ToString()))}
481-
{nameof(GrantedAccess)} : {SysHandleEx.GrantedAccessString}
482-
{nameof(HandleObjectType)} : {(initProps ? (HandleObjectType.v ?? HandleObjectType.ex?.ToString()) : (handleObjectType.v ?? handleObjectType.ex?.ToString()))}
483-
{nameof(HandleValue)} : {HandleValue} (0x{HandleValue:X})
484-
{nameof(IsClosed)} : {IsClosed}
485-
{nameof(IsDirectory)} : {(initProps ? (IsDirectory.v?.ToString() ?? IsDirectory.ex?.ToString()) : (isDirectory.v?.ToString() ?? isDirectory.ex?.ToString()))}
486-
{nameof(IsFileHandle)} : {(initProps ? (IsFileHandle.v?.ToString() ?? IsFileHandle.ex?.ToString()) : (isFileHandle.v?.ToString() ?? isFileHandle.ex?.ToString()))}
487-
{nameof(IsInvalid)} : {IsInvalid}
488-
{nameof(ObjectAddress)} : {ObjectAddress} (0x{ObjectAddress:X})
489-
{nameof(ObjectName)} : {(initProps ? (ObjectName.v ?? ObjectName.ex?.ToString()) : (objectName.v ?? objectName.ex?.ToString()))}
490-
{nameof(ProcessId)} : {ProcessId}
477+
{nameof(CreatorBackTraceIndex)} : {CreatorBackTraceIndex}
478+
{nameof(FileFullPath)} : {(initProps ? (FileFullPath.v ?? FileFullPath.ex?.ToString()) : (fileFullPath.v ?? fileFullPath.ex?.ToString()))}
479+
{nameof(FileHandleType)} : {(initProps ? (FileHandleType.v?.ToString() ?? FileFullPath.ex?.ToString()) : (fileHandleType.v?.ToString() ?? fileHandleType.ex?.ToString()))}
480+
{nameof(FileName)} : {(initProps ? (FileName.v ?? FileName.ex?.ToString()) : (fileName.v ?? fileName.ex?.ToString()))}
481+
{nameof(GrantedAccess)} : {SysHandleEx.GrantedAccessString}
482+
{nameof(HandleObjectType)} : {(initProps ? (HandleObjectType.v ?? HandleObjectType.ex?.ToString()) : (handleObjectType.v ?? handleObjectType.ex?.ToString()))}
483+
{nameof(HandleValue)} : {HandleValue} (0x{HandleValue:X})
484+
{nameof(IsClosed)} : {IsClosed}
485+
{nameof(IsDirectory)} : {(initProps ? (IsDirectory.v?.ToString() ?? IsDirectory.ex?.ToString()) : (isDirectory.v?.ToString() ?? isDirectory.ex?.ToString()))}
486+
{nameof(IsFileHandle)} : {(initProps ? (IsFileHandle.v?.ToString() ?? IsFileHandle.ex?.ToString()) : (isFileHandle.v?.ToString() ?? isFileHandle.ex?.ToString()))}
487+
{nameof(IsInvalid)} : {IsInvalid}
488+
{nameof(ObjectAddress)} : {ObjectAddress} (0x{ObjectAddress:X})
489+
{nameof(ObjectName)} : {(initProps ? (ObjectName.v ?? ObjectName.ex?.ToString()) : (objectName.v ?? objectName.ex?.ToString()))}
490+
{nameof(ProcessId)} : {ProcessId}
491491
{nameof(ProcessInfo.ParentId)} : {(initProcessInfo ? (ProcessInfo.ParentId.v?.ToString() ?? ProcessInfo.ParentId.ex?.ToString()) : (processInfo?.ParentId.v?.ToString() ?? processInfo?.ParentId.ex?.ToString() ?? string.Empty))}
492492
{nameof(ProcessInfo.ProcessCommandLine)} : {(initProcessInfo ? (ProcessInfo.ProcessCommandLine.v ?? ProcessInfo.ProcessCommandLine.ex?.ToString()) : (processInfo?.ProcessCommandLine.v ?? processInfo?.ProcessCommandLine.ex?.ToString() ?? string.Empty))}
493493
{nameof(ProcessInfo.ProcessMainModulePath)} : {(initProcessInfo ? (ProcessInfo.ProcessMainModulePath.v ?? ProcessInfo.ProcessMainModulePath.ex?.ToString()) : (processInfo?.ProcessMainModulePath.v ?? processInfo?.ProcessMainModulePath.ex?.ToString() ?? string.Empty))}
494494
{nameof(ProcessInfo.ProcessName)} : {(initProcessInfo ? (ProcessInfo.ProcessName.v ?? ProcessInfo.ProcessName.ex?.ToString()) : (processInfo?.ProcessName.v ?? processInfo?.ProcessName.ex?.ToString() ?? string.Empty))}
495495
{nameof(ProcessInfo.ProcessProtection)} : {(initProcessInfo ? (ProcessInfo.ProcessProtection.v?.ToString() ?? ProcessInfo.ProcessProtection.ex?.ToString()) : (processInfo?.ProcessProtection.v?.ToString() ?? processInfo?.ProcessProtection.ex?.ToString() ?? string.Empty))}
496-
{nameof(ExceptionLog)} : ...
496+
{nameof(ExceptionLog)} : ...
497497
" + string.Concat(exLog);
498498
}
499499
catch (Exception ex)

0 commit comments

Comments
 (0)