Use file-scoped namespaces (#842)

This commit is contained in:
PhyxionNL
2022-10-09 13:22:57 +02:00
committed by GitHub
parent 3ac329f247
commit 58cef111a1
175 changed files with 34026 additions and 34204 deletions
@@ -6,34 +6,33 @@
using System;
namespace LibreHardwareMonitor.Software
namespace LibreHardwareMonitor.Software;
/// <summary>
/// Contains basic information about the operating system.
/// </summary>
public static class OperatingSystem
{
/// <summary>
/// Contains basic information about the operating system.
/// Statically checks if the current system <see cref="Is64Bit"/> and <see cref="IsUnix"/>.
/// </summary>
public static class OperatingSystem
static OperatingSystem()
{
/// <summary>
/// Statically checks if the current system <see cref="Is64Bit"/> and <see cref="IsUnix"/>.
/// </summary>
static OperatingSystem()
{
// The operating system doesn't change during execution so let's query it just one time.
PlatformID platform = Environment.OSVersion.Platform;
IsUnix = platform is PlatformID.Unix or PlatformID.MacOSX;
// The operating system doesn't change during execution so let's query it just one time.
PlatformID platform = Environment.OSVersion.Platform;
IsUnix = platform is PlatformID.Unix or PlatformID.MacOSX;
if (Environment.Is64BitOperatingSystem)
Is64Bit = true;
}
/// <summary>
/// Gets information about whether the current system is 64 bit.
/// </summary>
public static bool Is64Bit { get; }
/// <summary>
/// Gets information about whether the current system is Unix based.
/// </summary>
public static bool IsUnix { get; }
if (Environment.Is64BitOperatingSystem)
Is64Bit = true;
}
}
/// <summary>
/// Gets information about whether the current system is 64 bit.
/// </summary>
public static bool Is64Bit { get; }
/// <summary>
/// Gets information about whether the current system is Unix based.
/// </summary>
public static bool IsUnix { get; }
}