TinyHelpers
TinyHelpers copied to clipboard
A collection of helper methods and classes for .NET that I use every day. I have packed them in a single library to avoid code duplication.
Ciao! pensi che una soluzione del genere possa essere utile ? È un attributo per validare il Content-Type di un'immagine o video (ad esempio)
Besides the library, it is necessary to create also a sample project.
The `TinyHelpers.AspNetCore.Attributes` namespace should be renamed to `TinyHelpers.AspNetCore.DataAnnotations`, to be aligned with the standard.
The project uses **nullable reference types**. The `IsValid` method in the [FileSizeAttribute.cs](https://github.com/marcominerva/TinyHelpers/blob/develop/src/TinyHelpers.AspNetCore/Attributes/FileSizeAttribute.cs#L18): `protected override ValidationResult IsValid(object value, ValidationContext validationContext)` Does not respect the nullability of the input and output parameters.
It is necessary to add the **net70** Target Framework and then update the code accordingly (i.e., removing the JSON converters that are no more needed).
Hello; I think it would be helpful in the README to document each of the helpers, what they do, and where to use them. It looks like there's a lot...
Trimming strings in JSON document is a common requirement. It is useful to have a converter to automatically perform this task.