Is it possible to inform resharper that a class will be deserialized, in order to stop it suggesting "Auto-property can be made get-only"? Especially since accepting the resharper suggestion to make the property get-only will break deserialization using System.Text.Json.
Below is an example scenario, where we have an initialized list whose contents are updated and subsequently serialized. The setter initializer is required so that the object can be deserialized via System.Text.Json.
public class MyClass
{
public List<int> Numbers { get; set; } = new(); // resharper warns property can be made get only
}
I appreciate this can be done explicitly for each property (or the entire file) via a 'disable comment', but this is rather ugly.
// ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global