We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73b6dac commit 65aee74Copy full SHA for 65aee74
ObjectFiller/Filler.cs
@@ -86,22 +86,9 @@ public T Create()
86
public IEnumerable<T> Create(int count)
87
{
88
IList<T> items = new List<T>();
89
- var typeStack = new HashStack<Type>();
90
- Type targetType = typeof(T);
91
for (int n = 0; n < count; n++)
92
93
- T objectToFill;
94
- if (!TypeIsClrType(targetType))
95
- {
96
- objectToFill = (T)this.CreateInstanceOfType(targetType, this.setupManager.GetFor<T>(), typeStack);
97
- this.Fill(objectToFill);
98
- }
99
- else
100
101
- objectToFill = (T)this.CreateAndFillObject(typeof(T), this.setupManager.GetFor<T>(), typeStack);
102
103
-
104
- items.Add(objectToFill);
+ items.Add(this.Create());
105
}
106
107
return items;
0 commit comments