Пример #1
0
        internal void RaisePropertyChanged <TMember>(Expression <Func <TMember> > expression)
        {
            if (expression == null)
            {
                throw new ArgumentNullException("expression");
            }

            var body = expression.Body as MemberExpression;

            if (body == null)
            {
                throw new ArgumentException("The expression must target a property or field.", "expression");
            }

            var propertyName = NotifyPropertyChangedHelper.GetPropertyName(body, m_owner.GetType());

            this.InvokeDelegate(propertyName);
        }
Пример #2
0
		private static bool PropertyChanged(MemberExpression expression, Type ownerType, PropertyChangedEventArgs e, bool targetPropertyOnly)
		{
			var propertyName = NotifyPropertyChangedHelper.GetPropertyName(expression, ownerType);

			return NotifyPropertyChangedHelper.PropertyChanged(propertyName, e, targetPropertyOnly);
		}