Skip to content

Commit 587cd3d

Browse files
committed
add MaskedTextProviderTests(#7758)
1 parent 372063c commit 587cd3d

File tree

3 files changed

+664
-1
lines changed

3 files changed

+664
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
4+
namespace Extensions
5+
{
6+
public static class EnumeratorExtensions
7+
{
8+
public static IEnumerable<T> ToEnumerable<T>(this IEnumerator<T> enumerator)
9+
{
10+
while(enumerator.MoveNext())
11+
yield return enumerator.Current;
12+
}
13+
14+
public static IEnumerator<T> Cast<T>(this IEnumerator iterator)
15+
{
16+
while (iterator.MoveNext())
17+
{
18+
yield return (T) iterator.Current;
19+
}
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)