Skip to content

(De)?Serialization should report problem in a clean manner if DU does not have unique Event Type names #3

@bartelink

Description

@bartelink

In EncodedEvent.serializeUnionByCaseItemType and its inverse there is a reliance on a Seq.exactlyOne.

This should be replaced with a cached DU-level consistency verification with a clear message using a technique such as that in

let converters<'a> =
let valueConverters =
getValues typeof<'a>.Assembly
|> Seq.map valueConverter
|> Seq.toList
[ unionConverter; optionConverter]
@ valueConverters
allowing the actual lookup to just be on a find-first basis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions