예제 #1
0
        public void Binding()
        {
            IDisposable binding = new ValueBinding <int>(left, right);

            left.Set(1);

            Assert.Equal(1, right.Get());

            right.Set(2);

            Assert.Equal(2, left.Get());

            binding.Dispose();

            left.Set(3);

            Assert.Equal(2, right.Get());
        }
예제 #2
0
        public void Binding()
        {
            IDisposable binding = new ValueBinding<int>(left, right);

            left.Set(1);

            Assert.Equal(1, right.Get());

            right.Set(2);

            Assert.Equal(2, left.Get());

            binding.Dispose();

            left.Set(3);

            Assert.Equal(2, right.Get());
        }