コード例 #1
0
        public void TestPropertyChangedSendInline()
        {
            var receivedDateTimeLocal = DateTime.MinValue;

            var vm = new TestViewModelInlinePropertyChanged();

            vm.PropertyChanged += (s, e) =>
            {
                if (e.PropertyName == "LastChanged1")
                {
                    receivedDateTimeLocal = vm.LastChanged1;
                }
            };

            var now = DateTime.Now;

            vm.LastChanged1 = now;

            Assert.AreEqual(now, vm.LastChanged1);
            Assert.AreEqual(now, receivedDateTimeLocal);
        }
コード例 #2
0
        public void TestPropertyChangedSendInlineOutOfSetter()
        {
            var vm = new TestViewModelInlinePropertyChanged();

            vm.RaisePropertyChangedInlineOutOfPropertySetter();
        }