summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-06-24 11:58:05 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-24 11:58:05 +0700
commit2300b64ad3992674a776ed29166b32efbf37b9d8 (patch)
tree9dba69e3facf71a02d5ba11b43c83c6380ee6348
parentNEW_REFLECTION cleanup (diff)
downloadBouncyCastle.NET-ed25519-2300b64ad3992674a776ed29166b32efbf37b9d8.tar.xz
Cleanup Platform
-rw-r--r--crypto/src/util/Platform.cs36
1 files changed, 1 insertions, 35 deletions
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)
         {