commandline icon indicating copy to clipboard operation
commandline copied to clipboard

Fix #777: Treat Objects with Init Properties as Immutable

Open rjkovach opened this issue 2 months ago • 0 comments

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.

rjkovach avatar Oct 25 '25 14:10 rjkovach