-
Couldn't load subscription status.
- Fork 354
Closed
FirelyTeam/firely-net-common
#156Labels
bitesize!breaking changeThis issue/commit causes a breaking change, and requires a major version upgradeThis issue/commit causes a breaking change, and requires a major version upgrade
Milestone
Description
Concerning the extension method ObjectListExtensions.OfType in the Hl7.Fhir.Support library:
- Why this custom method, as LINQ also provides a (generic) method
OfType<T>with same behavior out of the box? - The LINQ
OfType<T>method uses theisoperator, which automatically skips/excludesnullvalues but includes subclasses. The custom method compares runtime types, which throws an exception fornullvalues and excludes subclasses.
Suggestions:
- Remove this method, use LINQ instead
- Or rewrite the method to behave exactly the same as the LINQ method (using
isoperator) - Or rename this method to e.g. OfExactType (only if the API depends on such behavior)
Metadata
Metadata
Assignees
Labels
bitesize!breaking changeThis issue/commit causes a breaking change, and requires a major version upgradeThis issue/commit causes a breaking change, and requires a major version upgrade