public ExtendedProperties Clone()
        {
            var clone = new ExtendedProperties();

            this.Each(ep => clone.Add(ep.Clone()));
            return(clone);
        }
Example #2
0
        public ExtendedProperty <U> Property <U>(Expression <Func <T, U> > exp)
        {
            var key = getKey(exp);

            if (_extendedProperties.Contains(key))
            {
                return(_extendedProperties[key].DowncastTo <ExtendedProperty <U> >());
            }

            var extendedProperty = new ExtendedProperty <U>
            {
                Name          = key,
                ValueAsObject = default(U)
            };

            _extendedProperties.Add(extendedProperty);
            return(_extendedProperties[key].DowncastTo <ExtendedProperty <U> >());
        }