コード例 #1
0
        public IEnumerable <T> GetCollection <T>(Func <IEnumerable <T> > getMethod, string propertyName)
        {
            ComputedPropertyBase property;

            if (!_computedPropertyByName.TryGetValue(propertyName, out property))
            {
                property = new ComputedCollection <T>(getMethod);
                _computedPropertyByName.Add(propertyName, property);
            }
            return((IEnumerable <T>)property.Value);
        }
コード例 #2
0
        protected IEnumerable <T> GetCollection <T>(Func <IEnumerable <T> > getMethod, [CallerMemberName] string propertyName = "")
        {
            ForView.Initialize();
            ComputedPropertyBase property;

            if (!_computedPropertyByName.TryGetValue(propertyName, out property))
            {
                property = new ComputedCollection <T>(getMethod);
                _computedPropertyByName.Add(propertyName, property);
            }
            return((IEnumerable <T>)property.Value);
        }