commandline
commandline copied to clipboard
Fix #777: Treat Objects with Init Properties as Immutable
Currently, ReflectionExtensions.IsMutable() looks for public properties on an object which are writable to determine whether it is mutable. However, this logic does not account for other common immutable patterns like private setters or the newer init-only properties. This change adds support for both of these patterns.
Adding this support also adds support for using C# 9 record types, which are immutable by default, as options types.
Adds new tests for the various immutable patterns as well as parsing arguments to record types.
Fix #777.