Closed tcortega closed 1 year ago
When I moved the GenericExtensions as you said, to the Extensions folder, there seemed to be an issue with using the Extension methods in the TomlCompositeDeserializer.cs
, an error saying.
Ambiguous invocation: Tomlet.Attributes.TomlNonSerializedAttribute GetCustomAttribute<TomlNonSerializedAttribute>(this System.Reflection.MemberInfo) (in class CustomAttributeExtensions) Tomlet.Attributes.TomlNonSerializedAttribute? GetCustomAttribute<TomlNonSerializedAttribute>(this System.Reflection.MemberInfo) (in class GenericExtensions) match
Therefore it is now calling the method in the static class directly.
The behaviour in the mechanism is based on the behaviour observed on the System.Text.Json library, when attempting to deserialize JSON strings.
N
parameters. This specially useful when dealing with records. Because most people declare records as following:record MyRecord(string MyString, ...)
TomlSerializerOptions
class with anOverrideConstructorValues
option.if there is anything wrong with it, let me know or feel free to change it yourself.