Skip to content
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

Fix compile errors with Hl7.Fhir.R4 version 4.x #502

Merged

Conversation

rbauck
Copy link
Contributor

@rbauck rbauck commented Aug 16, 2022

Have done some minimal testing with Hl7.Fhir.R4 version 4.1.0, but have hit some snags that seems to be fixed with a couple of small changes, that I believe should not have any implications on the functionality. But I am not very familiar with code base.

As newer firely implements IEnumerable<X> in more classes, we check
that X = Element before actually doing traversal. Without this test, an
illegal cast exception is generated.
Newer Firely library has where T: struct, Enum.
@kennethmyhra
Copy link
Collaborator

Thanks, I'll have a look at this later!

// If this member is an IEnumerable<Element>, go inside and recurse
if (property.PropertyType.GetInterface("IEnumerable`1") != null)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Strange that this doesn't work already, it seems we should already be filtering properly in propertyFilter(). Can you instead of doing another filtering on IEnumerable<Element> see how we can improve propertyFilter()?

@rbauck
Copy link
Contributor Author

rbauck commented Aug 22, 2022 via email

Share predicate to discriminate between single element properties and
enumerable of elements. Same function call => clearer intentions.
Copy link
Collaborator

@kennethmyhra kennethmyhra left a comment

Choose a reason for hiding this comment

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

Thanks, this is a nice improvement!

@kennethmyhra kennethmyhra merged commit 049a861 into FirelyTeam:r4/master Aug 22, 2022
@rbauck rbauck deleted the feat/support-firely-net-sdk-4 branch August 23, 2022 07:44
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.

None yet

2 participants