Trying fix the compiler error.

This commit is contained in:
BDisp
2023-08-10 03:25:37 +01:00
committed by Tig
parent 4d526695d6
commit 26ff571f6a

View File

@@ -5,7 +5,9 @@ using NStack;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Management;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
@@ -1420,9 +1422,9 @@ namespace Terminal.Gui {
return keyMod != Key.Null ? keyMod | key : key;
}
#pragma warning disable CA1416 // Validate platform compatibility
private static string GetParentProcessName ()
{
#pragma warning disable CA1416 // Validate platform compatibility
var myId = Process.GetCurrentProcess ().Id;
var query = string.Format ($"SELECT ParentProcessId FROM Win32_Process WHERE ProcessId = {myId}");
var search = new ManagementObjectSearcher ("root\\CIMV2", query);
@@ -1456,8 +1458,8 @@ namespace Terminal.Gui {
}
return parent.ProcessName;
}
#pragma warning restore CA1416 // Validate platform compatibility
}
public override void Init (Action terminalResized)
{