protected TType CreateAndGenerate <TType>(IGenerator generator, IBuilder builder, BuildSession session) { Assert.IsTrue(generator.GeneratesType(typeof(TType), builder, session), string.Format("Does not generate type {0}", typeof(TType))); var obj = generator.CreateRecord(typeof(TType), builder, session); return((TType)obj.Object); }
public void Set(object obj, IBuilder builder, BuildSession session) { var generatorValue = _generator.CreateRecord(MemberReturnType, builder, session); Member.SetValue(obj, generatorValue.Object); }