Skip to content

Releases

10.1.1

Choose a tag to compare

@LionelVallet LionelVallet released this 26 Oct 09:10

Packages .NET 10.0.14

10.1.0

Choose a tag to compare

@LionelVallet LionelVallet released this 24 Oct 19:01

Validate nested options reliably and name the options type in failures

The recursive validation looked each property up again by name, so a
property hidden with new and another type threw AmbiguousMatchException.
It also stopped startup on valid options: it read static properties, where
a default instance recursed until the stack overflowed, and descended into
framework objects whose getters throw or never end (a Type, a delegate, a
relative Uri, some certificates, a FileInfo). It compared visited objects by
value, so an equal but distinct object was not validated.

The validator walks the most derived readable declaration of each public
instance property and reads it through its PropertyInfo. Visited objects
are compared by reference, and a depth of 32 bounds computed properties
that return a new object on each read. Strings, primitives and enums are
skipped, and dictionary entries are still validated. Delegates, reflection
types, Uri, X509Certificate and FileSystemInfo are not descended.

Each validation result becomes one failure, worded as the .NET
ValidateDataAnnotations words it and naming the options type. The README
describes the failure message, what the recursion covers and how it
compares with the .NET validation.

Refs #1, #2, #3

BREAKING CHANGE: OptionsValidationException.Failures holds one entry per
validation error, naming the options type, instead of a single string that
joined every error. A base property hidden with new and static properties
are no longer validated. TryValidateObjectRecursive throws
ArgumentNullException for a null object.

10.0.13

Choose a tag to compare

@LionelVallet LionelVallet released this 24 Oct 18:59

Packages

10.0.12

Choose a tag to compare

@LionelVallet LionelVallet released this 24 Oct 18:59

Packages

10.0.11

Choose a tag to compare

@LionelVallet LionelVallet released this 12 Aug 04:49

Packages

10.0.1

Choose a tag to compare

@LionelVallet LionelVallet released this 30 Jul 08:45

Packages

10.0.0

Choose a tag to compare

@LionelVallet LionelVallet released this 12 Nov 09:43

.NET 10

9.0.10

Choose a tag to compare

@LionelVallet LionelVallet released this 15 Oct 05:39

Packages

9.0.9

Choose a tag to compare

@LionelVallet LionelVallet released this 09 Sep 19:19
Packages

9.0.8

Choose a tag to compare

@LionelVallet LionelVallet released this 05 Aug 04:12

Bump Microsoft.Extensions