Skip to content

Implemented support for optional properties usage in non-Enumerable LINQ queries #529

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 8, 2025

Conversation

VectorTetra
Copy link
Contributor

No description provided.

@xperiandri xperiandri changed the title Implemented support for valueOption properties in CosmosDB tests Implemented support for optional properties in non-Enumerable LINQ queries May 8, 2025
@xperiandri xperiandri changed the title Implemented support for optional properties in non-Enumerable LINQ queries Implemented support for optional properties usage in non-Enumerable LINQ queries May 8, 2025
@xperiandri xperiandri closed this May 8, 2025
@xperiandri xperiandri reopened this May 8, 2025
@xperiandri xperiandri merged commit a84c6aa into fsprojects:dev May 8, 2025
3 checks passed
else
let t = value.GetType()
if t.FullName.StartsWith ReflectionHelper.OptionTypeName then
let p = t.GetProperty("Value")
Copy link
Collaborator

Choose a reason for hiding this comment

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

why isn't there a test for if the value is a None like in the ValueOption case (ValueNone)? I mean:

if value = Activator.CreateInstance t then None

?
Is it intentional?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It is a check for ValueOption.None. As it is a value type it's instance is empty struct

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.

3 participants