Skip to content

Conversation

@nickevansuk
Copy link
Contributor

@RehanSaeed I've had a go at refactoring along the lines you explained, but all nulls now seem to be rendering... for both OneOrMany<> and Values<>!

Did I miss something here?

@RehanSaeed
Copy link
Owner

Yes, I tried the same and got the same weird result. Needs more investigation.

/// <summary>
/// Gets whether the value of either type <typeparamref name="T1" />, type <typeparamref name="T2" />, type <typeparamref name="T3" />, or type <typeparamref name="T4" /> has a value.
/// </summary>
public bool HasValue => this.HasValue1 || this.HasValue2 || this.HasValue3 || this.HasValue4;
Copy link
Owner

Choose a reason for hiding this comment

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

Nice idea. This should be another PR. Looks like we might not get this one in quickly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ye this was mainly so the tests would continue passing, as quite a few relied on Nullable<>.HasValue, and broke when we removed the ?

@nickevansuk
Copy link
Contributor Author

Just to note that I'm on leave for the next few days, but any ideas from anyone on this very welcome!

@RehanSaeed
Copy link
Owner

Added your HasValue idea to master.

@shervinw shervinw mentioned this pull request Sep 5, 2019
@RehanSaeed
Copy link
Owner

Closing in favour of #84. Thanks for your efforts!

@RehanSaeed RehanSaeed closed this Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants