From b6b1cfccb92dd14d9d69ef5b43570943800c4c9d Mon Sep 17 00:00:00 2001 From: atef Date: Fri, 27 Feb 2026 12:55:39 +0100 Subject: [PATCH] cleare unused tojson function --- csharp/App/SaliMax/src/Ess/StatusRecord.cs | 20 -------------------- 1 file changed, 20 deletions(-) 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