8000 Beautify Platform class · thatfrankdev/libgit2sharp@1e64435 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e64435

Browse files
Beautify Platform class
This commit beautifies the Platform class by removing unused usings and streamlining code.
1 parent cad89d0 commit 1e64435

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

LibGit2Sharp/Core/Platform.cs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
52

63
namespace LibGit2Sharp.Core
74
{
@@ -12,18 +9,13 @@ internal enum OperatingSystemType
129
MacOSX
1310
}
1411

15-
internal class Platform
12+
internal static class Platform
1613
{
1714
public static string ProcessorArchitecture
1815
{
1916
get
2017
{
21-
if (Environment.Is64BitProcess)
22-
{
23-
return "amd64";
24-
}
25-
26-
return "x86";
18+
return Environment.Is64BitProcess ? "amd64" : "x86";
2719
}
2820
}
2921

@@ -32,8 +24,6 @@ public static OperatingSystemType OperatingSystem
3224
get
3325
{
3426
// See http://www.mono-project.com/docs/faq/technical/#how-to-detect-the-execution-platform
35-
var platformId = (int)Environment.OSVersion.Platform;
36-
3727
switch ((int)Environment.OSVersion.Platform)
3828
{
3929
case 4:

0 commit comments

Comments
 (0)
0