Skip to content

Conversation

@ChrisPulman
Copy link
Member

Updated Bind, OneWayBind and BindTo to allow nullable properties to be selected with less decorators.
Sub properties will still require ! and ? operators as required.
The Aim is to have less of an impact to those users upgrading older code.

What kind of change does this PR introduce?

update

What is the current behaviour?

Bind, OneWayBind and BindTo all require additional Nullable decorators to remove 'result may be null' compiler warnings for Nullable ViewModels and Properties

What is the new behaviour?

The Bind, OneWay and BindTo property binding extension methods now do not require additional decorators for the ViewModel and the first property

What might this PR break?

None expected, but a code review should take place to remove any additional ! and ? decorators that may have been used previously

Please check if the PR fulfils these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:

…els and ViewModel Properties

Updated Bind, OneWayBind and BindTo to allow nullable properties to be selected with less decorators.
Sub properties will still require ! and ? operators as required.
The Aim is to have less of an impact to those users upgrading older code.
@codecov
Copy link

codecov bot commented May 16, 2021

Codecov Report

Merging #2759 (e138bc8) into main (a2d3674) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2759   +/-   ##
=======================================
  Coverage   62.63%   62.63%           
=======================================
  Files         133      133           
  Lines        4775     4775           
=======================================
  Hits         2991     2991           
  Misses       1784     1784           
Impacted Files Coverage Δ
...ctiveUI/Bindings/Property/PropertyBindingMixins.cs 91.66% <ø> (ø)
.../Bindings/Property/PropertyBinderImplementation.cs 87.22% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2d3674...e138bc8. Read the comment docs.

where TViewModel : class
where TView : class, ReactiveUI.IViewFor { }
[return: System.Runtime.CompilerServices.TupleElementNames(new string[] {
[return: System.Runtime.CompilerServices.TupleElementNames(new string?[]?[] {
Copy link
Contributor

@worldbeater worldbeater May 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The string?[]?[] signature looks like a curious bug in the API generator btw. Not particularly related to the changes in this PR, just sharing a minor observation

@ChrisPulman ChrisPulman merged commit 1da2bd6 into main May 16, 2021
@ChrisPulman ChrisPulman deleted the UpdateForPropertyBinding_Bind_OneWayBind_BindTo_ForNullableProperties branch May 16, 2021 18:02
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 23, 2021
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.

3 participants