From 1e644359df387a519710b769afb7824ae46b8c69 Mon Sep 17 00:00:00 2001 From: ThomasBarnekow Date: Tue, 14 Apr 2015 10:45:35 +0200 Subject: [PATCH] Beautify Platform class This commit beautifies the Platform class by removing unused usings and streamlining code. --- LibGit2Sharp/Core/Platform.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/LibGit2Sharp/Core/Platform.cs b/LibGit2Sharp/Core/Platform.cs index 8297cc4bf..debdc73ae 100644 --- a/LibGit2Sharp/Core/Platform.cs +++ b/LibGit2Sharp/Core/Platform.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace LibGit2Sharp.Core { @@ -12,18 +9,13 @@ internal enum OperatingSystemType MacOSX } - internal class Platform + internal static class Platform { public static string ProcessorArchitecture { get { - if (Environment.Is64BitProcess) - { - return "amd64"; - } - - return "x86"; + return Environment.Is64BitProcess ? "amd64" : "x86"; } } @@ -32,8 +24,6 @@ public static OperatingSystemType OperatingSystem get { // See http://www.mono-project.com/docs/faq/technical/#how-to-detect-the-execution-platform - var platformId = (int)Environment.OSVersion.Platform; - switch ((int)Environment.OSVersion.Platform) { case 4: