Пример #1
0
		internal static bool PropertyChanged<TOwner, TMember>(
		  Expression<Func<TOwner, TMember>> expression,
		  PropertyChangedEventArgs e,
		  bool targetPropertyOnly)
		{
			var body = expression.Body as MemberExpression;
			if (body == null)
				throw new ArgumentException("The expression must target a property or field.", "expression");

			return NotifyPropertyChangedHelper.PropertyChanged(body, typeof(TOwner), e, targetPropertyOnly);
		}
Пример #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);
		}