Units: create extensions methods for Int32's

This commit is contained in:
ig 2023-08-16 15:12:23 +02:00
parent 9b4b947569
commit 2bd20ce4eb
1 changed files with 13 additions and 0 deletions

View File

@ -23,6 +23,19 @@ public static class Units
public static Energy Wh (this Double value) => value;
public static Percent Percent(this Double value) => value;
public static Current A (this Int32 value) => value;
public static Voltage V (this Int32 value) => value;
public static ActivePower W (this Int32 value) => value;
public static ReactivePower Var (this Int32 value) => value;
public static ApparentPower Va (this Int32 value) => value;
public static Resistance Ohm (this Int32 value) => value;
public static Frequency Hz (this Int32 value) => value;
public static Angle Rad (this Int32 value) => value;
public static Temperature Celsius(this Int32 value) => value;
public static Energy KWh (this Int32 value) => value * 1000;
public static Energy Wh (this Int32 value) => value;
public static Percent Percent(this Int32 value) => value;
public static String ToCsv(this Object thing)
{
var csvLines = new List<String>();