Skip to content

Conversation

@eivinhb
Copy link
Member

@eivinhb eivinhb commented Nov 10, 2023

Code-improve - Kaizen

  • Upgrade xscgen to the newest version ++
  • move xml domain to a properly scoped namespace
  • Build with .net 6.x
  • Better scoping in mapping code by always using V8 for generated types

Refactor IdentificationResult

The class IdentificationResult had a public constructor taking a string
as parameter and internally performed mapping between the generated
xml-domain and its own domain. This strange stringy contract made for
tight coupling between the domains. This should be done in the
transformation code DataTransferObjectConverter. Now with an internal
constructor and two different ones makes for better separation of consern
between what is an error and what is an identified person.

With regards to IdentificationError.Unknown vs NotFound, I made this comment in the code:

Unknown is never actually returned from Digipost. NotFound is. But since Unknown has
been the de facto response for NotFound since for ever in this client library
we should just keep it that way.

The class IdentificationResult had a public constructor taking a string
as parameter and internally performed mapping between the generated
xml-domain and its own domain. This strange stringy contract made for
tight coupling between the domains. This should be done in the
transformation code DataTransferObjectConverter. Now with an internal
constructor and two different ones makes for better separation of consern
between what is an error and what is an identified person.

With regards to IdentificationError.Unknown vs NotFound, I made this comment in the code:

`Unknown` is never actually returned from Digipost. `NotFound` is. But since `Unknown` has
been the de facto response for `NotFound` since for ever in this client library
we should just keep it that way.
* Upgrade xscgen to the newest version ++
* move xml domain to a properly scoped namespace
* Build with .net 6.x
* Better scopeing in mapping code by allways useing V8 for generated types
@eivinhb eivinhb changed the title Upgrade xscgen Upgrade xscgen, net6.0 and kaizen Nov 10, 2023
@eivinhb eivinhb merged commit 98c49ad into main Jan 30, 2024
@eivinhb eivinhb deleted the upgrade_xscgen branch January 30, 2024 15:10
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.

2 participants