invio / Invio.Immutable

C# Library used to ease immutable class creation and data management
MIT License
2 stars 0 forks source link

[StringComparison] Attribute Support #51

Closed carusology closed 6 years ago

carusology commented 6 years ago

Closes #12

I had to upgrade to .NET Standard v2 in order to get access to PropertyInfo.ReflectedType property as well as the InvariantCulture and InvariantCultureIgnoreCase string comparisons.

This enables us to slap on an attribute to individual properties or whole classes to declare how string properties will have hash codes and equality comparisons performed for their respective values. This is useful downstream for code that uses string-based enum concepts over the web APIs where case is irrelevant, as well as for our data models that are persisted into relational databases with a case-insensitive character sets.