FirelyTeam / firely-net-sdk

The official Firely .NET SDK for HL7 FHIR
Other
829 stars 345 forks source link

Simplify the POCO public surface #2900

Open ewoutkramer opened 1 month ago

ewoutkramer commented 1 month ago

The public surface of the POCOs has grown substantially over the years. This makes many features hard to discover. Also, to create your own resource classes or subclasses is hard because of the number of generated methods that need to be done manually. To get a sense of this problem, take a look at the public surface.

Things to consider:

This is slower, but would require less hand-written code. This of course, is certainly true for the IDictionary implementation itself, which depends heavily on generated code. One possibility could be to enable Custom resources using a separate CustomResource subclass that implements these methods by reflection (or even on-the-fly generated IL, but I don't want to think about that).

In general, we should go over the pocos and see which things can be implemented based on GetElementPairs or are old designs and no longer necessary.