Skip to content

Commit b7562c7

Browse files
Merge pull request #20 from MystikalPooka/BugFix/EditorWindows
Bug fix/editor windows
2 parents 8f71200 + 46f2670 commit b7562c7

File tree

106 files changed

+3896
-1591
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+3896
-1591
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6))
2+
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
3+
4+
using System;
5+
using System.Collections.Generic;
6+
7+
namespace UniRx.Async
8+
{
9+
public static class EnumerableAsyncExtensions
10+
{
11+
// overload resolver - .Select(async x => { }) : IEnumerable<UniTask<T>>
12+
13+
public static IEnumerable<UniTask> Select<T>(this IEnumerable<T> source, Func<T, UniTask> selector)
14+
{
15+
return System.Linq.Enumerable.Select(source, selector);
16+
}
17+
18+
public static IEnumerable<UniTask<TR>> Select<T, TR>(this IEnumerable<T> source, Func<T, UniTask<TR>> selector)
19+
{
20+
return System.Linq.Enumerable.Select(source, selector);
21+
}
22+
23+
public static IEnumerable<UniTask> Select<T>(this IEnumerable<T> source, Func<T, int, UniTask> selector)
24+
{
25+
return System.Linq.Enumerable.Select(source, selector);
26+
}
27+
28+
public static IEnumerable<UniTask<TR>> Select<T, TR>(this IEnumerable<T> source, Func<T, int, UniTask<TR>> selector)
29+
{
30+
return System.Linq.Enumerable.Select(source, selector);
31+
}
32+
}
33+
}
34+
35+
36+
#endif

Assets/Plugins/UniRx/Scripts/Async/EnumerableAsyncExtensions.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6))
2+
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
3+
4+
using System.Collections.Generic;
5+
6+
namespace UniRx.Async.Internal
7+
{
8+
public static class PromiseHelper
9+
{
10+
public static void TrySetResultAll<TPromise, T>(IEnumerable<TPromise> source, T value)
11+
where TPromise : class, IResolvePromise<T>
12+
{
13+
var rentArray = ArrayPoolUtil.Materialize(source);
14+
var clearArray = true;
15+
try
16+
{
17+
var array = rentArray.Array;
18+
var len = rentArray.Length;
19+
for (int i = 0; i < len; i++)
20+
{
21+
array[i].TrySetResult(value);
22+
array[i] = null;
23+
}
24+
clearArray = false;
25+
}
26+
finally
27+
{
28+
rentArray.DisposeManually(clearArray);
29+
}
30+
}
31+
}
32+
}
33+
34+
#endif

Assets/Plugins/UniRx/Scripts/Async/Internal/PromiseHelper.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)