public GenerationContext(int recursiveCount, TypeStack typeStack, IGeneratorResolver resolver, FieldInfo fieldInfo)
 {
     RecursiveCount = recursiveCount;
     TypeStack      = typeStack;
     Resolver       = resolver;
     FieldInfo      = fieldInfo;
 }
        public object[] CreateMany(Type type, int length = 9, int recursiveCount = 3, IGeneratorResolver resolver = null)
        {
            resolver = resolver ?? defaultResolver;
            var xs        = new object[length];
            var generator = resolver.GetGenerator(type);
            var stack     = new TypeStack(new Stack <Type>());

            for (int i = 0; i < xs.Length; i++)
            {
                xs[i] = generator.Generate(new GenerationContext(recursiveCount, stack, resolver, null));
            }
            return(xs);
        }
 public Exit(TypeStack parent)
 {
     this.parent = parent;
 }