justin-millman / Kvasir

A non-invasive object-relational mapping framework for a variety of back-end database providers
GNU General Public License v3.0
0 stars 1 forks source link

Use Generic Attribute for Check.Complex and DataProvider #112

Closed justin-millman closed 4 months ago

justin-millman commented 4 months ago

C# 11 allows generic types to inherit from Attribute, so we should take advantage of that. The [DataConverter] and [Check.Complex] attributes both currently take a type argument, and that can change to be a generic type argument. We can even use a where clause to perform a compile-time check that the type implements the desired interface; that would remove the need for 2 unit tests.

Not urgent, just QOL.