Пример #1
0
        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);
        }
Пример #2
0
        public void Set(object obj, IBuilder builder, BuildSession session)
        {
            var generatorValue = _generator.CreateRecord(MemberReturnType, builder, session);

            Member.SetValue(obj, generatorValue.Object);
        }