Skip to content

Commit e6406a1

Browse files
committed
Made TypesToCheck IEnumerable<Type>
1 parent 6c6cb1b commit e6406a1

File tree

1 file changed

+13
-2
lines changed
  • TestStack.ConventionTests/ConventionData

1 file changed

+13
-2
lines changed

TestStack.ConventionTests/ConventionData/Types.cs

Lines changed: 13 additions & 2 deletions
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,7 +10,7 @@
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
public Types(string descriptionOfTypes) : this(Enumerable.Empty<Type>(), descriptionOfTypes)
1516
{
@@ -21,7 +22,7 @@ public Types(IEnumerable<Type> types, string descriptionOfTypes)
2122
Description = descriptionOfTypes;
2223
}
2324

24-
public Type[] TypesToVerify { get; private set; }
25+
public IEnumerable<Type> TypesToVerify { get; private set; }
2526

2627
public string Description { get; private set; }
2728

@@ -210,5 +211,15 @@ private static string GetAssemblyName(Assembly assembly)
210211
{
211212
return assembly.GetName().Name;
212213
}
214+
215+
public IEnumerator<Type> GetEnumerator()
216+
{
217+
return TypesToVerify.GetEnumerator();
218+
}
219+
220+
IEnumerator IEnumerable.GetEnumerator()
221+
{
222+
return GetEnumerator();
223+
}
213224
}
214225
}

0 commit comments

Comments
 (0)