Skip to content

Refactor BindToObject#854

Merged
zsd4yr merged 5 commits into
dotnet:masterfrom
hughbe:binding-refactor
May 10, 2019
Merged

Refactor BindToObject#854
zsd4yr merged 5 commits into
dotnet:masterfrom
hughbe:binding-refactor

Conversation

@hughbe
Copy link
Copy Markdown
Contributor

@hughbe hughbe commented Apr 22, 2019

Essentially the BindToObject class is strangely connected to Binding. It seems to be designed to be used separately, but this just causes confusion as there are two different sources of truth that need to be (and are) synchronised. We can avoid this by

  • Accessing properties on Binding and not exposing BindToObject to anyone outside of the BindingClass (commit 1-3)
  • Moving properties from BindToObject to Binding which has central ownership of these properties

@hughbe hughbe requested a review from a team as a code owner April 22, 2019 21:24
@zsd4yr
Copy link
Copy Markdown
Contributor

zsd4yr commented May 6, 2019

@hughbe this looks good, do sny tests need to be changed or added? any additional verifs?

@hughbe
Copy link
Copy Markdown
Contributor Author

hughbe commented May 6, 2019

@zsd4yr I'm happy with the current test coverage, especially once #867 is merged. We've got coverage for BindingManagerBase and friends here: https://github.com/dotnet/winforms/blob/master/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/BindingContextTests.cs#L805-L969

@zsd4yr zsd4yr merged commit 260d783 into dotnet:master May 10, 2019
@hughbe hughbe deleted the binding-refactor branch May 10, 2019 20:49
RussKie added a commit to RussKie/winforms that referenced this pull request Sep 13, 2019
…anged.PropertyChanged event

A regression introduced in dotnet#854 that caused bindings in the middle object
to remain after those were unwired in the target control.

Fixes dotnet#1679
RussKie added a commit to RussKie/winforms that referenced this pull request Sep 24, 2019
…anged.PropertyChanged event

A regression introduced in dotnet#854 that caused bindings in the middle object
to remain after those were unwired in the target control.

Fixes dotnet#1679

(cherry picked from commit e04cb68)
@ghost ghost locked as resolved and limited conversation to collaborators Feb 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants