Open makp0 opened 1 year ago
BeImmutable() fails on records, because IsReadonly() does not detect init only properties.
public static bool IsInitOnly(this PropertyDefinition property) => property.SetMethod.ReturnType.FullName == typeof(System.Runtime.CompilerServices.IsExternalInit).FullName;
BeImmutable() fails on records, because IsReadonly() does not detect init only properties.
public static bool IsInitOnly(this PropertyDefinition property) => property.SetMethod.ReturnType.FullName == typeof(System.Runtime.CompilerServices.IsExternalInit).FullName;