Initial Commit (broken due to version update)
This commit is contained in:
parent
74003df84b
commit
3f7b3b7440
3132 changed files with 1103305 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace UniRx
|
||||
{
|
||||
public static class AotSafeExtensions
|
||||
{
|
||||
public static IEnumerable<T> AsSafeEnumerable<T>(this IEnumerable<T> source)
|
||||
{
|
||||
var e = ((IEnumerable)source).GetEnumerator();
|
||||
using (e as IDisposable)
|
||||
{
|
||||
while (e.MoveNext())
|
||||
{
|
||||
yield return (T)e.Current;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue