diff --git a/csharp/App/SaliMax/src/Ess/StatusRecord.cs b/csharp/App/SaliMax/src/Ess/StatusRecord.cs index 386680a7b..230928d8a 100644 --- a/csharp/App/SaliMax/src/Ess/StatusRecord.cs +++ b/csharp/App/SaliMax/src/Ess/StatusRecord.cs @@ -32,24 +32,4 @@ public record StatusRecord public required EssControl EssControl { get; set; } // TODO: init only public required StateMachine StateMachine { get; init; } - - public string ToJson() - { - // Try to get the "Battery" property via reflection - // var batteryProperty = thing.GetType().GetProperty("Battery"); - // if (batteryProperty == null) - // throw new InvalidOperationException("The object does not have a 'Battery' property."); - // - // // Retrieve the value of the Battery property - // var batteryValue = Battery.GetValue(thing); - var jsonOptions = new JsonSerializerOptions { WriteIndented = true }; - - // Serialize the Battery property - Console.WriteLine("eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"); - string json = JsonSerializer.Serialize(this.Battery, jsonOptions); - Console.WriteLine(json); - - - return json; - } } \ No newline at end of file