Framework_4_0 preprocessor is necessary for legacy compatibility.
This commit is contained in:
parent
12fe97babd
commit
558fcf495a
15 changed files with 755 additions and 46 deletions
|
|
@ -28,7 +28,9 @@ using System.Reflection;
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
#if Framework_4_0
|
||||
using System.Threading.Tasks;
|
||||
#endif
|
||||
|
||||
using Server;
|
||||
using Server.Accounting;
|
||||
|
|
@ -110,7 +112,11 @@ namespace Server
|
|||
public static Thread Thread { get { return m_Thread; } }
|
||||
public static MultiTextWriter MultiConsoleOut { get { return m_MultiConOut; } }
|
||||
|
||||
#if Framework_4_0
|
||||
public static readonly bool Is64Bit = Environment.Is64BitProcess;
|
||||
#else
|
||||
public static readonly bool Is64Bit = (IntPtr.Size == 8); //Returns the size for the current /process/
|
||||
#endif
|
||||
|
||||
private static bool m_MultiProcessor;
|
||||
private static int m_ProcessorCount;
|
||||
|
|
@ -662,10 +668,17 @@ namespace Server
|
|||
if( a == null )
|
||||
return;
|
||||
|
||||
#if Framework_4_0
|
||||
Parallel.ForEach(a.GetTypes(), t =>
|
||||
{
|
||||
VerifyType(t);
|
||||
});
|
||||
#else
|
||||
foreach (Type t in a.GetTypes())
|
||||
{
|
||||
VerifyType(t);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue