remove private constructor, no longer needed bcs of "required"

This commit is contained in:
ig 2023-08-31 13:10:07 +02:00
parent cc2ab03d01
commit c955b97c2b
3 changed files with 3 additions and 11 deletions

View File

@ -1,11 +1,8 @@
namespace InnovEnergy.Lib.Units.Composite; namespace InnovEnergy.Lib.Units.Composite;
public class Ac3Bus
public sealed class Ac3Bus
{ {
private Ac3Bus() {}
public required AcPhase L1 { get; init; } public required AcPhase L1 { get; init; }
public required AcPhase L2 { get; init; } public required AcPhase L2 { get; init; }
public required AcPhase L3 { get; init; } public required AcPhase L3 { get; init; }

View File

@ -5,8 +5,6 @@ namespace InnovEnergy.Lib.Units.Composite;
public sealed class AcPhase public sealed class AcPhase
{ {
private AcPhase(){}
public required Voltage Voltage { get; init; } public required Voltage Voltage { get; init; }
public required Current Current { get; init; } public required Current Current { get; init; }
public required AcPower Power { get; init; } public required AcPower Power { get; init; }

View File

@ -98,13 +98,10 @@ public sealed class AcPower
public static AcPower operator -(AcPower p) public static AcPower operator -(AcPower p)
{ {
var activePower = -p.Active;
var reactivePower = -p.Reactive;
return FromActiveReactive return FromActiveReactive
( (
activePower, -p.Active,
reactivePower -p.Reactive
); );
} }