From 2300b64ad3992674a776ed29166b32efbf37b9d8 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Fri, 24 Jun 2022 11:58:05 +0700 Subject: Cleanup Platform --- crypto/src/util/Platform.cs | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) (limited to 'crypto') diff --git a/crypto/src/util/Platform.cs b/crypto/src/util/Platform.cs index cb96adc8b..f0b2406a5 100644 --- a/crypto/src/util/Platform.cs +++ b/crypto/src/util/Platform.cs @@ -1,7 +1,5 @@ using System; using System.Globalization; -using System.IO; -using System.Text; #if PORTABLE using System.Collections.Generic; @@ -17,22 +15,10 @@ namespace Org.BouncyCastle.Utilities internal static bool EqualsIgnoreCase(string a, string b) { -#if PORTABLE return string.Equals(a, b, StringComparison.OrdinalIgnoreCase); -#else - return ToUpperInvariant(a) == ToUpperInvariant(b); -#endif } -#if PORTABLE && !DOTNET - internal static string GetEnvironmentVariable( - string variable) - { - return null; - } -#else - internal static string GetEnvironmentVariable( - string variable) + internal static string GetEnvironmentVariable(string variable) { try { @@ -45,7 +31,6 @@ namespace Org.BouncyCastle.Utilities return null; } } -#endif internal static Exception CreateNotImplementedException( string message) @@ -140,39 +125,20 @@ namespace Org.BouncyCastle.Utilities internal static string ToLowerInvariant(string s) { -#if PORTABLE return s.ToLowerInvariant(); -#else - return s.ToLower(CultureInfo.InvariantCulture); -#endif } internal static string ToUpperInvariant(string s) { -#if PORTABLE return s.ToUpperInvariant(); -#else - return s.ToUpper(CultureInfo.InvariantCulture); -#endif } internal static readonly string NewLine = Environment.NewLine; -#if PORTABLE internal static void Dispose(IDisposable d) { d.Dispose(); } -#else - internal static void Dispose(Stream s) - { - s.Close(); - } - internal static void Dispose(TextWriter t) - { - t.Close(); - } -#endif internal static int IndexOf(string source, string value) { -- cgit 1.4.1