Init
This commit is contained in:
31
Shared/Models/OutputResolution.cs
Normal file
31
Shared/Models/OutputResolution.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using View_by_Distance.Shared.Models.Methods;
|
||||
|
||||
namespace View_by_Distance.Shared.Models;
|
||||
|
||||
public class OutputResolution : Properties.IOutputResolution, 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;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user