mirror of
https://github.com/Cysharp/UniTask.git
synced 2026-05-14 19:10:09 +00:00
Revert "Fix conditional compilation to work with .NET Framework"
This reverts commit 7d31299b5c.
This commit is contained in:
@@ -19,7 +19,7 @@ namespace Cysharp.Threading.Tasks
|
||||
|
||||
// similar as IValueTaskSource
|
||||
public interface IUniTaskSource
|
||||
#if !UNITY_2018_3_OR_NEWER && UNITY_2021_2_OR_NEWER && !NETSTANDARD2_0
|
||||
#if (!UNITY_2018_3_OR_NEWER || UNITY_2021_2_OR_NEWER) && !NETSTANDARD2_0
|
||||
: System.Threading.Tasks.Sources.IValueTaskSource
|
||||
#pragma warning disable CS0108
|
||||
#endif
|
||||
@@ -30,7 +30,7 @@ namespace Cysharp.Threading.Tasks
|
||||
|
||||
UniTaskStatus UnsafeGetStatus(); // only for debug use.
|
||||
|
||||
#if !UNITY_2018_3_OR_NEWER && UNITY_2021_2_OR_NEWER && !NETSTANDARD2_0
|
||||
#if (!UNITY_2018_3_OR_NEWER || UNITY_2021_2_OR_NEWER) && !NETSTANDARD2_0
|
||||
#pragma warning restore CS0108
|
||||
|
||||
System.Threading.Tasks.Sources.ValueTaskSourceStatus System.Threading.Tasks.Sources.IValueTaskSource.GetStatus(short token)
|
||||
@@ -53,13 +53,13 @@ namespace Cysharp.Threading.Tasks
|
||||
}
|
||||
|
||||
public interface IUniTaskSource<out T> : IUniTaskSource
|
||||
#if !UNITY_2018_3_OR_NEWER && UNITY_2021_2_OR_NEWER && !NETSTANDARD2_0
|
||||
#if (!UNITY_2018_3_OR_NEWER || UNITY_2021_2_OR_NEWER) && !NETSTANDARD2_0
|
||||
, System.Threading.Tasks.Sources.IValueTaskSource<T>
|
||||
#endif
|
||||
{
|
||||
new T GetResult(short token);
|
||||
|
||||
#if !UNITY_2018_3_OR_NEWER && UNITY_2021_2_OR_NEWER && !NETSTANDARD2_0
|
||||
#if (!UNITY_2018_3_OR_NEWER || UNITY_2021_2_OR_NEWER) && !NETSTANDARD2_0
|
||||
|
||||
new public UniTaskStatus GetStatus(short token)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#if !UNITY_2018_3_OR_NEWER && UNITY_2021_2_OR_NEWER
|
||||
#if !UNITY_2018_3_OR_NEWER || UNITY_2021_2_OR_NEWER
|
||||
#pragma warning disable 0649
|
||||
|
||||
using System;
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Cysharp.Threading.Tasks
|
||||
return new UniTask<bool>(new IsCanceledSource(source), token);
|
||||
}
|
||||
|
||||
#if !UNITY_2018_3_OR_NEWER && UNITY_2021_2_OR_NEWER
|
||||
#if !UNITY_2018_3_OR_NEWER || UNITY_2021_2_OR_NEWER
|
||||
|
||||
public static implicit operator System.Threading.Tasks.ValueTask(in UniTask self)
|
||||
{
|
||||
@@ -440,7 +440,7 @@ namespace Cysharp.Threading.Tasks
|
||||
return self.AsUniTask();
|
||||
}
|
||||
|
||||
#if !UNITY_2018_3_OR_NEWER && UNITY_2021_2_OR_NEWER
|
||||
#if !UNITY_2018_3_OR_NEWER || UNITY_2021_2_OR_NEWER
|
||||
|
||||
public static implicit operator System.Threading.Tasks.ValueTask<T>(in UniTask<T> self)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user