public void CreateDependent_DependentsNull() { Expression <Func <object> >[] dependents = null; int v = 0; NotifyingProperty.CreateDependent(() => v, () => null, dependents); }
public void CreateDependent_PropertyDeclTypeDoesNotImplementINotifyPropertyChanged() { int x = 0, y = 1; NotifyingProperty.CreateDependent( () => x, () => null, () => y); }
public void CreateDependent_DependentsHasNoMemberReference() { var o = new NotifyPropertyChanged(); Func <int, string> f = a => a.ToString(); NotifyingProperty.CreateDependent( () => o.CurrentStep, () => null, () => f(42)); }
public Worker() { currentStep = NotifyingProperty.Create(() => CurrentStep, () => PropertyChanged); totalSteps = NotifyingProperty.Create(() => TotalSteps, () => PropertyChanged); // A PropertyChanged notification will be created for Progress every time // either the CurrentStep *or* TotalSteps changes. NotifyingProperty.CreateDependent( () => Progress, () => PropertyChanged, () => CurrentStep, () => TotalSteps); }
public void CreateDependent_NotifierNull() { int v = 0; NotifyingProperty.CreateDependent(() => v, null); }
public void CreateDependent_PropertyNull() { NotifyingProperty.CreateDependent <int>(null, () => null); }