using System.Text.Json.Serialization; namespace Adaptation.FileHandlers.OpenInsightMetrologyViewer; public class BarcodeRecord : IBarcodeRecord { protected string _Barcode; protected string _Date; protected BarcodeDevice _Device; protected string _Id; protected string _ServerId; public string Barcode => _Barcode; public string Date => _Date; public BarcodeDevice Device => _Device; public string Id => _Id; public string ServerId => _ServerId; public BarcodeRecord() { _Barcode = string.Empty; _Date = string.Empty; _Device = new BarcodeDevice(); _Id = string.Empty; _ServerId = string.Empty; } [JsonConstructor] public BarcodeRecord(string barcode, string date, BarcodeDevice device, string id, string serverId) { _Barcode = barcode; _Date = date; _Device = device; _Id = id; _ServerId = serverId; } }