Ejemplo n.º 1
0
        public override void Execute(OID oid, AttributeValuesMap values)
        {
            _value = values[AttributeName];
            if (!(_value is ICollection || IsGenericCollection(_value.GetType())))
                return;

            // For collection,we encapsulate it in an lazy load list that will create objects on demand
            var c = ((IEnumerable) _value).Cast<object>().ToList();
            var l = new LazySimpleListOfAoi<object>(GetInstanceBuilder(), ReturnInstance());
            l.AddRange(c);
            _value = l;
        }
Ejemplo n.º 2
0
        public override void Execute(OID oid, AttributeValuesMap values)
        {
            _value = values[AttributeName];
            if (!(_value is ICollection || IsGenericCollection(_value.GetType())))
            {
                return;
            }

            // For collection,we encapsulate it in an lazy load list that will create objects on demand
            var c = ((IEnumerable)_value).Cast <object>().ToList();
            var l = new LazySimpleListOfAoi <object>(GetInstanceBuilder(), ReturnInstance());

            l.AddRange(c);
            _value = l;
        }