Remove unused code.

This commit is contained in:
drieseng
2020-02-29 17:19:55 +01:00
parent 1f325586eb
commit c9d6ca4b33
@@ -1,32 +0,0 @@
using System;
namespace Renci.SshNet.Security.Org.BouncyCastle.Utilities
{
internal abstract class Enums
{
internal static Enum GetEnumValue(System.Type enumType, string s)
{
// We only want to parse single named constants
if (s.Length > 0 && char.IsLetter(s[0]) && s.IndexOf(',') < 0)
{
s = s.Replace('-', '_');
s = s.Replace('/', '_');
return (Enum)Enum.Parse(enumType, s, false);
}
throw new ArgumentException();
}
internal static Array GetEnumValues(System.Type enumType)
{
return Enum.GetValues(enumType);
}
internal static Enum GetArbitraryValue(System.Type enumType)
{
Array values = GetEnumValues(enumType);
int pos = (int)(int.MaxValue) % values.Length;
return (Enum)values.GetValue(pos);
}
}
}