YamlDotNet
YamlDotNet copied to clipboard
Common parts extracted + more changes for #984
Common parts from ReadablePropertiesTypeInspector and WritablePropertiesTypeInspector are extracted to PropertiesTypeInspector and more changes to support #984:
- virtual method PropertiesTypeInspector.CreateProperty
- public property ReflectionPropertyDescriptor.PropertyInfo
PS: During the refactoring I found that the type inspectors might need more refactoring:
The ReadableAndWritablePropertiesTypeInspector only checks if properties are writable, but despite its name it does not check if they are readable.
https://github.com/aaubry/YamlDotNet/blob/7923dd8e600f7fea7710f3b45f3fadcfa1aa589c/YamlDotNet/Serialization/TypeInspectors/ReadableAndWritablePropertiesTypeInspector.cs#L44-L48
Maybe it should be renamed to something like WritablePropertiesTypeInspectorFilter? (But that would be a breaking change.)
Do you want to create an issue for this?