/// <summary>
 /// Builds an instance of <see cref="PropertyChangingConstraint{TSubject}"/> that allows checking whether a type raises a
 /// <see cref="INotifyPropertyChanging.PropertyChanging"/> when a property is set.
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="subject"> Instance of the event raising type.</param>
 /// <param name="eventArgsConstraint">Constraint to be applied to the event arg property.</param>
 /// <typeparam name="TSubject">Type that raises the <see cref="INotifyPropertyChanging.PropertyChanging"/> event.</typeparam>
 /// <returns>Instance built.</returns>
 public static PropertyChangingConstraint <TSubject> PropertyChanging <TSubject>(this Must.RaiseEntryPoint entry, TSubject subject, Constraint eventArgsConstraint) where TSubject : INotifyPropertyChanging
 {
     return(new PropertyChangingConstraint <TSubject>(subject, eventArgsConstraint));
 }
Пример #2
0
 public static Constraint ObsoleteEvent(this Must.RaiseEntryPoint entryPoint, uint times)
 {
     return(new ObsoleteCurrencyRaisedConstraint(times));
 }
 /// <summary>
 /// Builds an instance of <see cref="PropertyChangingConstraint{TSubject}"/> that allows checking whether a type raises a
 /// <see cref="INotifyPropertyChanging.PropertyChanging"/> when a property is set.
 /// </summary>
 /// <param name="entry">Extension entry point.</param>
 /// <param name="subject"> Instance of the event raising type.</param>
 /// <param name="property">Expression that represents the name of a property.</param>
 /// <typeparam name="TSubject">Type that raises the <see cref="INotifyPropertyChanging.PropertyChanging"/> event.</typeparam>
 /// <returns>Instance built.</returns>
 public static PropertyChangingConstraint <TSubject> PropertyChanging <TSubject>(this Must.RaiseEntryPoint entry, TSubject subject, Expression <Func <TSubject, object> > property) where TSubject : INotifyPropertyChanging
 {
     return(new PropertyChangingConstraint <TSubject>(subject, property));
 }