Exemplo n.º 1
0
 public GenerationContext(int recursiveCount, TypeStack typeStack, IGeneratorResolver resolver, FieldInfo fieldInfo)
 {
     RecursiveCount = recursiveCount;
     TypeStack      = typeStack;
     Resolver       = resolver;
     FieldInfo      = fieldInfo;
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public Exit(TypeStack parent)
 {
     this.parent = parent;
 }