Resolve CA5392

This commit is contained in:
JustArchi 2021-05-07 23:04:50 +02:00
parent 69a12fadcf
commit bc74c69ac5
2 changed files with 5 additions and 1 deletions

View file

@ -115,7 +115,6 @@ dotnet_diagnostic.ca1028.severity = silent
dotnet_diagnostic.ca1031.severity = silent
# TODO - one at a time
dotnet_diagnostic.ca5392.severity = silent
dotnet_diagnostic.ca5394.severity = silent
# Rule - almost everything

View file

@ -255,19 +255,24 @@ namespace ArchiSteamFarm {
internal const sbyte StandardInputHandle = -10;
#pragma warning disable CA2101
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[DllImport("libc", EntryPoint = "chmod", SetLastError = true)]
internal static extern int Chmod(string path, int mode);
#pragma warning restore CA2101
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[DllImport("kernel32.dll")]
internal static extern bool GetConsoleMode(IntPtr hConsoleHandle, out uint lpMode);
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[DllImport("kernel32.dll")]
internal static extern IntPtr GetStdHandle(int nStdHandle);
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[DllImport("kernel32.dll")]
internal static extern bool SetConsoleMode(IntPtr hConsoleHandle, uint dwMode);
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[DllImport("kernel32.dll")]
internal static extern EExecutionState SetThreadExecutionState(EExecutionState executionState);