mirror of
https://github.com/aaru-dps/Aaru.CommonTypes.git
synced 2025-12-16 19:24:30 +00:00
Add XML comments to public entities.
This commit is contained in:
@@ -44,14 +44,29 @@ using System.Security.Principal;
|
||||
|
||||
namespace Aaru.CommonTypes.Interop
|
||||
{
|
||||
/// <summary>
|
||||
/// Detects the underlying execution framework and operating system
|
||||
/// </summary>
|
||||
public static class DetectOS
|
||||
{
|
||||
/// <summary>
|
||||
/// Are we running under Mono?
|
||||
/// </summary>
|
||||
public static readonly bool IsMono =
|
||||
RuntimeInformation.FrameworkDescription.StartsWith("Mono", StringComparison.Ordinal);
|
||||
/// <summary>
|
||||
/// Are we running under .NET Framework?
|
||||
/// </summary>
|
||||
public static readonly bool IsNetFramework =
|
||||
RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.Ordinal);
|
||||
/// <summary>
|
||||
/// Are we running under .NET Core?
|
||||
/// </summary>
|
||||
public static readonly bool IsNetCore =
|
||||
RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.Ordinal);
|
||||
/// <summary>
|
||||
/// Are we running under .NET Native?
|
||||
/// </summary>
|
||||
public static readonly bool IsNetNative =
|
||||
RuntimeInformation.FrameworkDescription.StartsWith(".NET Native", StringComparison.Ordinal);
|
||||
|
||||
@@ -61,6 +76,9 @@ namespace Aaru.CommonTypes.Interop
|
||||
/// <summary>Checks if the underlying runtime runs in 32-bit mode</summary>
|
||||
public static readonly bool Is32Bit = IntPtr.Size == 4;
|
||||
|
||||
/// <summary>
|
||||
/// Are we running under Windows?
|
||||
/// </summary>
|
||||
public static bool IsWindows => GetRealPlatformID() == PlatformID.Win32NT ||
|
||||
GetRealPlatformID() == PlatformID.Win32S ||
|
||||
GetRealPlatformID() == PlatformID.Win32Windows ||
|
||||
@@ -68,6 +86,9 @@ namespace Aaru.CommonTypes.Interop
|
||||
GetRealPlatformID() == PlatformID.WindowsPhone ||
|
||||
GetRealPlatformID() == PlatformID.Xbox;
|
||||
|
||||
/// <summary>
|
||||
/// Are we running with administrative (root) privileges?
|
||||
/// </summary>
|
||||
public static bool IsAdmin
|
||||
{
|
||||
get
|
||||
|
||||
Reference in New Issue
Block a user