From 01d35cecbdcbbf5c81f50c84c84bceb29a17b671 Mon Sep 17 00:00:00 2001 From: Aigio Liu Date: Mon, 29 May 2023 14:09:05 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Platform/IPlatformService.IsAdministrator.cs | 4 ++-- src/BD.WTTS.Client/Startup/Startup.Commands.cs | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/BD.WTTS.Client/Services/Platform/IPlatformService.IsAdministrator.cs b/src/BD.WTTS.Client/Services/Platform/IPlatformService.IsAdministrator.cs index 2cdc3ca22..19234cfc2 100644 --- a/src/BD.WTTS.Client/Services/Platform/IPlatformService.IsAdministrator.cs +++ b/src/BD.WTTS.Client/Services/Platform/IPlatformService.IsAdministrator.cs @@ -10,9 +10,9 @@ partial interface IPlatformService return identity.IsSystem || new WindowsPrincipal(identity) .IsInRole(WindowsBuiltInRole.Administrator); #elif MACCATALYST || MACOS || LINUX || IOS || ANDROID - return Interop.Libc.GetEUID() == 0; + return Interop.Libc.GetEUID() == 0; #else - throw new PlatformNotSupportedException(); + throw new PlatformNotSupportedException(); #endif }); diff --git a/src/BD.WTTS.Client/Startup/Startup.Commands.cs b/src/BD.WTTS.Client/Startup/Startup.Commands.cs index bf79bd445..218c04ba4 100644 --- a/src/BD.WTTS.Client/Startup/Startup.Commands.cs +++ b/src/BD.WTTS.Client/Startup/Startup.Commands.cs @@ -2,12 +2,14 @@ using dotnetCampus.Ipc.CompilerServices.GeneratedProxies; using System.CommandLine; using System.CommandLine.NamingConventionBinder; +#endif // ReSharper disable once CheckNamespace namespace BD.WTTS; partial class Startup // 自定义控制台命令参数 { +#if (WINDOWS || MACCATALYST || MACOS || LINUX) && !(IOS || ANDROID) [MethodImpl(MethodImplOptions.AggressiveInlining)] void ConfigureCommands(RootCommand rootCommand) { @@ -446,6 +448,7 @@ partial class Startup // 自定义控制台命令参数 }; rootCommand.AddCommand(types); } +#endif public enum CommandExitCode { @@ -501,5 +504,4 @@ partial class Startup // 自定义控制台命令参数 #endregion } -} -#endif \ No newline at end of file +} \ No newline at end of file