Skip to content

A library for shared (domain driven, primitive) types

License

Notifications You must be signed in to change notification settings

peereflits/Shared.Types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Peereflits.Shared.Types

This library/package contains types that behave like (domain-driven-design) primitive types. These types contain self-contained rules, behaviors and data and have no external dependencies.

This library contains the following types:

  • AGB code (an identifying key of Dutch healthcare providers)
  • BSN number (a Dutch social-security number)
  • E-mail address
  • IBAN number
  • Mime types
  • Phone number (Dutch- and international phone numbers)

Rules for adding new types

Before adding new types, keep the following rules in mind:

  • This library MUST ONLY contain types that have the exact same meaning among other projects/solutions1.
  • This library MUST have no dependencies (.NET BCL only).
    1. As a result this library should also be usable in Blazor.
  • This library CAN be shared/used among all other projects.
  • This library SHOULD only contain concrete types; no interfaces.
  • All types in this library SHOULD behave as "immutable types".
  • All types in this library MUST be under unit tests.

As a general rule:

  • types that have the same name, meaning and behavior both inside and outside an organization are likely to be good candidates;
  • types defined by external institutions or organizations2 are good candidates.

1) A type such as "Customer number" should therefore not occur, as different definitions (format, length, use) can live within different projects (and organisations).
2) For example: ISO with "country" and its ISO country code

Version support

This library supports the following .NET versions:

  1. .NET 6.0
  2. .NET 8.0
  3. .NET 9.0

© No copyright applicable
® "Peereflits" is my codename.


About

A library for shared (domain driven, primitive) types

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages