Beispiel #1
0
        /// <summary> Ands the given propertry expression. </summary>
        ///
        /// <typeparam name="TProp"> Type of the property. </typeparam>
        /// <param name="propertryExpression"> The propertry expression. </param>
        ///
        /// <returns> A PropertyChangedExpectation&lt;T&gt; </returns>
        public PropertyChangedExpectation <T> And <TProp>(Expression <Func <T, TProp> > propertryExpression)
        {
            var newPropertyNames =
                this.thePropertyNames.Concat(new[]
            {
                ExpressionUtlilities.GetPropertyName(propertryExpression)
            }).ToArray();


            return(new PropertyChangedExpectation <T>(
                       this.theSubject,
                       newPropertyNames));
        }
Beispiel #2
0
 ShouldNotifyFor <T, TProp>(this T subject, Expression <Func <T, TProp> > propertyExpression)
     where T : INotifyPropertyChanged
 {
     return(new PropertyChangedExpectation <T>(subject, ExpressionUtlilities.GetPropertyName(propertyExpression)));
 }