14 lines
428 B
C#
14 lines
428 B
C#
using InnovEnergy.Lib.Utils;
|
|
|
|
namespace InnovEnergy.Lib.Units.Composite;
|
|
|
|
public record DcBus : IBus
|
|
{
|
|
public Voltage Voltage { get; init; }
|
|
public Current Current { get; init; }
|
|
|
|
public Power Power => Current * Voltage;
|
|
|
|
public static DcBus operator |(DcBus left, DcBus right) => OpParallel(left, right);
|
|
private static readonly Func<DcBus, DcBus, DcBus> OpParallel = "|".CreateBinaryOpForProps<DcBus>();
|
|
} |