using System.Text.Json; using System.Text.Json.Serialization; namespace View_by_Distance.Shared.Models; public class OutputResolution : Properties.IOutputResolution { protected int _Height; protected int _Orientation; protected int _Width; public int Height => _Height; public int Orientation => _Orientation; public int Width => _Width; [JsonConstructor] public OutputResolution(int height, int orientation, int width) { _Height = height; _Orientation = orientation; _Width = width; } public override string ToString() { string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true }); return result; } }