예제 #1
0
        public void CreateDependent_DependentsNull()
        {
            Expression <Func <object> >[] dependents = null;
            int v = 0;

            NotifyingProperty.CreateDependent(() => v, () => null, dependents);
        }
예제 #2
0
        public void CreateDependent_PropertyDeclTypeDoesNotImplementINotifyPropertyChanged()
        {
            int x = 0, y = 1;

            NotifyingProperty.CreateDependent(
                () => x,
                () => null,
                () => y);
        }
예제 #3
0
        public void CreateDependent_DependentsHasNoMemberReference()
        {
            var o = new NotifyPropertyChanged();
            Func <int, string> f = a => a.ToString();

            NotifyingProperty.CreateDependent(
                () => o.CurrentStep,
                () => null,
                () => f(42));
        }
예제 #4
0
            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);
            }
예제 #5
0
        public void CreateDependent_NotifierNull()
        {
            int v = 0;

            NotifyingProperty.CreateDependent(() => v, null);
        }
예제 #6
0
 public void CreateDependent_PropertyNull()
 {
     NotifyingProperty.CreateDependent <int>(null, () => null);
 }