Ejemplo n.º 1
0
        internal Slot CreateConcreteSlot(Slot instance, int index)
        {
            Slot res = instance;

            foreach (PropertyInfo pi in Tuple.GetAccessPath(instance.Type, index))
            {
                res = new PropertySlot(res, pi);
            }
            return(res);
        }
        public override Slot CreateSlot(Slot instance)
        {
            Slot slot    = instance;
            Type curType = null;

            foreach (PropertyInfo pi in Tuple.GetAccessPath(_tupleType, _index))
            {
                slot    = new PropertySlot(slot, pi);
                curType = pi.PropertyType;
            }
            if (_type != curType)
            {
                slot = new CastSlot(slot, _type);
            }
            return(slot);
        }
 public override Slot CreateSlot(Slot instance)
 {
     Slot slot = instance;
     Type curType = null;
     foreach (PropertyInfo pi in Tuple.GetAccessPath(_tupleType, _index)) {
         slot = new PropertySlot(slot, pi);
         curType = pi.PropertyType;
     }
     if (_type != curType) {
         slot = new CastSlot(slot, _type);
     }
     return slot;
 }