Replaced NETCORE defines with NET_CORE

This commit is contained in:
James King 2017-11-06 20:42:50 +00:00
parent 60933de240
commit 7d30ffc734
6 changed files with 18 additions and 6 deletions

View File

@ -108,10 +108,16 @@ public void RunUpdateCallbacks()
/// </summary>
public void UpdateWhile( Func<bool> func )
{
const int sleepMs = 1;
while ( func() )
{
Update();
System.Threading.Thread.Sleep( 1 );
#if NET_CORE
System.Threading.Tasks.Task.Delay( sleepMs ).Wait();
#else
System.Threading.Thread.Sleep( sleepMs );
#endif
}
}
}

View File

@ -75,7 +75,7 @@ public void Cancel()
remoteStorage.native.FileWriteStreamCancel( _handle );
}
#if NETCORE
#if NET_CORE
public void Close()
#else
public override void Close()

View File

@ -5,7 +5,7 @@
using System.Net.Sockets;
using System.IO;
#if !NETCORE
#if !NET_CORE
internal class SourceServerQuery :IDisposable
{

View File

@ -227,11 +227,17 @@ public bool IsRunning
/// </summary>
public void Block()
{
const int sleepMs = 10;
workshop.steamworks.Update();
while ( IsRunning )
{
System.Threading.Thread.Sleep( 10 );
#if NET_CORE
System.Threading.Tasks.Task.Delay( sleepMs ).Wait();
#else
System.Threading.Thread.Sleep( sleepMs );
#endif
workshop.steamworks.Update();
}
}

View File

@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NETCORE
#if !NET_CORE
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information

View File

@ -37,7 +37,7 @@ internal static Facepunch.Steamworks.OperatingSystem Os
{
_os = Facepunch.Steamworks.OperatingSystem.Windows;
#if !NETCORE
#if !NET_CORE
//
// These checks aren't so accurate on older versions of mono
//