Skip to content

Commit f6031a6

Browse files
committed
Made TypesToVerify IEnumerable<Type>
1 parent a6450c4 commit f6031a6

File tree

1 file changed

+14
-3
lines changed
  • TestStack.ConventionTests/ConventionData

1 file changed

+14
-3
lines changed

TestStack.ConventionTests/ConventionData/Types.cs

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
namespace TestStack.ConventionTests.ConventionData
22
{
33
using System;
4+
using System.Collections;
45
using System.Collections.Generic;
56
using System.ComponentModel;
67
using System.Linq;
@@ -9,15 +10,15 @@
910
/// <summary>
1011
/// This is where we set what our convention is all about.
1112
/// </summary>
12-
public class Types : IConventionData
13+
public class Types : IConventionData, IEnumerable<Type>
1314
{
1415
private Types(IEnumerable<Type> typesToVerify, string descriptionOfTypes)
1516
{
16-
TypesToVerify = types.ToArray();
17+
TypesToVerify = typesToVerify;
1718
Description = descriptionOfTypes;
1819
}
1920

20-
public Type[] TypesToVerify { get; private set; }
21+
public IEnumerable<Type> TypesToVerify { get; private set; }
2122

2223
public string Description { get; private set; }
2324

@@ -202,6 +203,16 @@ public static Types InCollection(IEnumerable<Type> types, string descriptionOfTy
202203
return new Types(types, descriptionOfTypes);
203204
}
204205

206+
public IEnumerator<Type> GetEnumerator()
207+
{
208+
return TypesToVerify.GetEnumerator();
209+
}
210+
211+
IEnumerator IEnumerable.GetEnumerator()
212+
{
213+
return GetEnumerator();
214+
}
215+
205216
private static string GetAssemblyName(Assembly assembly)
206217
{
207218
return assembly.GetName().Name;

0 commit comments

Comments
 (0)