-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from MystikalPooka/BugFix/EditorWindows
Bug fix/editor windows
- Loading branch information
Showing
106 changed files
with
3,896 additions
and
1,591 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
Assets/Plugins/UniRx/Scripts/Async/EnumerableAsyncExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) | ||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace UniRx.Async | ||
{ | ||
public static class EnumerableAsyncExtensions | ||
{ | ||
// overload resolver - .Select(async x => { }) : IEnumerable<UniTask<T>> | ||
|
||
public static IEnumerable<UniTask> Select<T>(this IEnumerable<T> source, Func<T, UniTask> selector) | ||
{ | ||
return System.Linq.Enumerable.Select(source, selector); | ||
} | ||
|
||
public static IEnumerable<UniTask<TR>> Select<T, TR>(this IEnumerable<T> source, Func<T, UniTask<TR>> selector) | ||
{ | ||
return System.Linq.Enumerable.Select(source, selector); | ||
} | ||
|
||
public static IEnumerable<UniTask> Select<T>(this IEnumerable<T> source, Func<T, int, UniTask> selector) | ||
{ | ||
return System.Linq.Enumerable.Select(source, selector); | ||
} | ||
|
||
public static IEnumerable<UniTask<TR>> Select<T, TR>(this IEnumerable<T> source, Func<T, int, UniTask<TR>> selector) | ||
{ | ||
return System.Linq.Enumerable.Select(source, selector); | ||
} | ||
} | ||
} | ||
|
||
|
||
#endif |
11 changes: 11 additions & 0 deletions
11
Assets/Plugins/UniRx/Scripts/Async/EnumerableAsyncExtensions.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
Assets/Plugins/UniRx/Scripts/Async/Internal/PromiseHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) | ||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member | ||
|
||
using System.Collections.Generic; | ||
|
||
namespace UniRx.Async.Internal | ||
{ | ||
public static class PromiseHelper | ||
{ | ||
public static void TrySetResultAll<TPromise, T>(IEnumerable<TPromise> source, T value) | ||
where TPromise : class, IResolvePromise<T> | ||
{ | ||
var rentArray = ArrayPoolUtil.Materialize(source); | ||
var clearArray = true; | ||
try | ||
{ | ||
var array = rentArray.Array; | ||
var len = rentArray.Length; | ||
for (int i = 0; i < len; i++) | ||
{ | ||
array[i].TrySetResult(value); | ||
array[i] = null; | ||
} | ||
clearArray = false; | ||
} | ||
finally | ||
{ | ||
rentArray.DisposeManually(clearArray); | ||
} | ||
} | ||
} | ||
} | ||
|
||
#endif |
11 changes: 11 additions & 0 deletions
11
Assets/Plugins/UniRx/Scripts/Async/Internal/PromiseHelper.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.