mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-16 13:45:07 +00:00
Added converter to improve object serialization
This commit is contained in:
20
src/ElectronNET.API/API/Entities/PageSize.cs
Normal file
20
src/ElectronNET.API/API/Entities/PageSize.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace ElectronNET.API.Entities;
|
||||
|
||||
public class PageSize
|
||||
{
|
||||
private readonly string _value;
|
||||
|
||||
public PageSize()
|
||||
{
|
||||
}
|
||||
|
||||
private PageSize(string value) : this() => _value = value;
|
||||
|
||||
public double Height { get; set; }
|
||||
|
||||
public double Width { get; set; }
|
||||
|
||||
public static implicit operator string(PageSize pageSize) => pageSize?._value;
|
||||
|
||||
public static implicit operator PageSize(string value) => new(value);
|
||||
}
|
||||
Reference in New Issue
Block a user