private static RuntimeType GetRuntimeType(string typeValue)
{
Debug.Assert(typeValue != null);
foreach (RuntimeType runtime in Enum.GetValues(typeof(RuntimeType)))
{
string comparisonValue = Enum.GetName(typeof(RuntimeType), runtime);
if (string.Equals(typeValue, comparisonValue, StringComparison.OrdinalIgnoreCase))
{
return runtime;
}
}
throw new ArgumentException(string.Format(Resources.InvalidRuntimeError, typeValue));
}