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