rename Ac1 in IAc1Connection to plain Ac

This commit is contained in:
ig 2023-02-26 19:20:43 +01:00
parent d5c5239744
commit 476a0a0fe2
4 changed files with 10 additions and 15 deletions

View File

@ -4,5 +4,5 @@ namespace InnovEnergy.Lib.StatusApi.Connections;
public interface IAc1Connection public interface IAc1Connection
{ {
Ac1Phase Ac1 { get; } Ac1Phase Ac { get; }
} }

View File

@ -1,17 +1,12 @@
using InnovEnergy.Lib.Utils;
namespace InnovEnergy.Lib.StatusApi; namespace InnovEnergy.Lib.StatusApi;
public abstract record DeviceStatus public abstract record DeviceStatus
{ {
public String DeviceType public String DeviceType => GetType()
{ .Generate(t => t.BaseType!)
get .First(t => t.IsAbstract)
{ .Name
var t = GetType(); .Replace("Status", "");
while (!t!.IsAbstract)
t = t.BaseType;
return t.Name.Replace("Status", "");
}
}
} }

View File

@ -3,7 +3,7 @@ using InnovEnergy.Lib.Units.Composite;
namespace InnovEnergy.Lib.StatusApi; namespace InnovEnergy.Lib.StatusApi;
public abstract record SinglePhaseInverterStatus(Ac1Phase Ac1, DcPhase Dc) : public abstract record SinglePhaseInverterStatus(Ac1Phase Ac, DcPhase Dc) :
DeviceStatus, DeviceStatus,
IAc1Connection, IAc1Connection,
IDcConnection; IDcConnection;

View File

@ -3,7 +3,7 @@ using InnovEnergy.Lib.Units.Composite;
namespace InnovEnergy.Lib.StatusApi; namespace InnovEnergy.Lib.StatusApi;
public abstract record SinglePhasePvInverterStatus(Ac1Phase Ac1, IReadOnlyList<DcPhase> Strings) : public abstract record SinglePhasePvInverterStatus(Ac1Phase Ac, IReadOnlyList<DcPhase> Strings) :
DeviceStatus, DeviceStatus,
IAc1Connection, IAc1Connection,
IPvConnection; IPvConnection;