mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-10 17:25:51 +00:00
Remove unused code.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user