Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }