Disabled the use of DynamicMethod when running on Mono, because as of Mono 1.2.5.1 its DynamicMethod implementation is too broken for us.

This commit is contained in:
jfrijters 2007-09-25 04:44:28 +00:00
Родитель d36bf2ea5a
Коммит abef13a3d9
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -124,12 +124,13 @@ using sndResolverConfigurationImpl = sun.net.dns.ResolverConfigurationImpl;
#if WHIDBEY #if WHIDBEY
sealed class DynamicMethodSupport sealed class DynamicMethodSupport
{ {
internal const bool Enabled = true; // MONOBUG as of Mono 1.2.5.1, DynamicMethod is too broken to be used
internal static readonly bool Enabled = Type.GetType("Mono.Runtime") == null;
} }
#else #else
sealed class DynamicMethodSupport sealed class DynamicMethodSupport
{ {
internal static readonly bool Enabled = Environment.Version.Major >= 2; internal static readonly bool Enabled = Environment.Version.Major >= 2 && Type.GetType("Mono.Runtime") == null;
} }
sealed class DynamicMethod sealed class DynamicMethod