Skip to content

Commit 51bc07f

Browse files
committed
Add EnumerableObject to avoid two public class in one file
1 parent 1e4bec6 commit 51bc07f

2 files changed

Lines changed: 14 additions & 10 deletions

File tree

DirectSQL/EnumerableObject.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
4+
namespace DirectSQL{
5+
/// <summary>
6+
/// Walk around for prohibited implemeting IEnumerable<dynamic>
7+
/// </summary>
8+
public abstract class EnumerableObject<T>: IEnumerable<T> {
9+
public abstract IEnumerator<T> GetEnumerator();
10+
IEnumerator IEnumerable.GetEnumerator(){
11+
return GetEnumerator();
12+
}
13+
}
14+
}

DirectSQL/SqlResult.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -464,14 +464,4 @@ public void Reset()
464464
}
465465
}
466466
}
467-
468-
/// <summary>
469-
/// Walk around for prohibited implemeting IEnumerable<dynamic>
470-
/// </summary>
471-
public abstract class EnumerableObject<S>: IEnumerable<S> {
472-
public abstract IEnumerator<S> GetEnumerator();
473-
IEnumerator IEnumerable.GetEnumerator(){
474-
return GetEnumerator();
475-
}
476-
}
477467
}

0 commit comments

Comments
 (0)