Isolated the problem with .NET 4.0 to the networking code changes; no reason to disallow support for .NET 4.0, and restoring default .NET FX 4.0 support

This commit is contained in:
asayre 2012-03-05 11:38:02 +00:00
parent 287bacac0e
commit b13718ca01
13 changed files with 46 additions and 531 deletions

View file

@ -1139,7 +1139,7 @@ namespace Server
return false;
Type type = typeof(T);
#if Framework_4_0
T tempVal;
if( type.IsEnum && Enum.TryParse( s, true, out tempVal ) )
@ -1152,19 +1152,6 @@ namespace Server
Console.WriteLine( "Could not parse {0} enum attribute '{1}' in element '{2}'", type, attribute, xml.Name );
return false;
}
#else
try
{
value = (T)Enum.Parse(type, s, true);
}
catch
{
Console.WriteLine( "Could not parse {0} enum attribute '{1}' in element '{2}'", type, attribute, xml.Name );
return false;
}
return true;
#endif
}
public static bool ReadMap( XmlElement xml, string attribute, ref Map value )