public T Get <T>(Func <T> getMethod, string propertyName) { ComputedPropertyBase property; if (!_computedPropertyByName.TryGetValue(propertyName, out property)) { property = new ComputedAtom <T>(() => _firePropertyChanged(propertyName), getMethod); _computedPropertyByName.Add(propertyName, property); } return((T)property.Value); }
protected T Get <T>(Func <T> getMethod, [CallerMemberName] string propertyName = "") { ForView.Initialize(); ComputedPropertyBase property; if (!_computedPropertyByName.TryGetValue(propertyName, out property)) { property = new ComputedAtom <T>(() => FirePropertyChanged(propertyName), getMethod); _computedPropertyByName.Add(propertyName, property); } return((T)property.Value); }