private void AddProperties(Entity entity, object poco, IList <string> recursionPath)
 {
     reflection
     .GetContentProperties(poco)
     .ForEach(prop =>
     {
         var name  = reflection.GetValueName(prop);
         var value = EntityValueFactory.FromPropertyInfo(poco, prop, this, recursionPath);
         entity.Properties.Add(name, value);
         recursionPath.Clear();
     });
 }
Esempio n. 2
0
        private void SetValues(object poco, Entity entity)
        {
            reflector
            .GetContentProperties(poco)
            .ForEach(prop =>
            {
                var name  = reflector.GetValueName(prop);
                var value = entity[name];

                prop.SetValue(poco, PocoValueFactory.FromEntityValue(prop, value, this));
            });
        }