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()); }
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()); }