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); }
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); }