/// <summary>Initializes a new instance of the <see cref="T:System.Object"></see> class.</summary>
        public Generator(TypeMeta typeRef, TypeGeneratorRepository tgr)
        {
            Meta = typeRef;
            foreach (var np in Meta.NestedProperties)
            {
                tgr.EnsureGeneratorFor(np.PropertyType);
            }

            _tgr = tgr;
        }
 public void EnsureGeneratorFor(Type t)
 {
     if (!_generators.ContainsKey(t))
     {
         var tm = new TypeMeta(t, Hijack);
         if (t.IsAnonymousType())
         {
             _generators[t] = new AnonymousDataGenerator(tm, this);
         }
         else
         {
             _generators[t] = new Generator(tm, this);
         }
     }
 }
Exemple #3
0
 /// <summary>Initializes a new instance of the <see cref="T:System.Object"></see> class.</summary>
 public AnonymousDataGenerator(TypeMeta typeRef, TypeGeneratorRepository tgr) : base(typeRef, tgr)
 {
 }