Skip to content

Commit

Permalink
Merge pull request #5 from AndreasReitberger/1-switch-to-observablepr…
Browse files Browse the repository at this point in the history
…operty

Switch to `observableproperty`
  • Loading branch information
AndreasReitberger committed Apr 29, 2023
2 parents 4cdd686 + 47bcecf commit 9c30cf6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions source/CoreSharp/Enums/PhysicalUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
{
public enum PhysicalUnit
{
g,
kg,
T,
cl,
ml,
l,
Gram,
KiloGram,
Ton,
CentiLiters,
MiliLiters,
Liters,
}
}
2 changes: 1 addition & 1 deletion source/CoreSharp/Utilities/CommonConverters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public static class CommonConverters
{
public static List<string> DictionaryToStringList(Dictionary<string, List<string>> dict)
{
List<string> list = new List<string>();
List<string> list = new();
if (dict == null) return list;
foreach (KeyValuePair<string, List<string>> pairs in dict)
{
Expand Down
14 changes: 7 additions & 7 deletions source/CoreSharp/Utilities/PhysicalUnitFactorConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ namespace AndreasReitberger.Core.Utilities
{
public class PhysicalUnitFactorConverter
{
public static Dictionary<PhysicalUnit, double> UnitFactors = new Dictionary<PhysicalUnit, double>()
public static Dictionary<PhysicalUnit, double> UnitFactors = new()
{
{PhysicalUnit.g, 1 },
{PhysicalUnit.kg, 1000 },
{PhysicalUnit.T, 1000000 },
{PhysicalUnit.cl, 0.1f },
{PhysicalUnit.ml, 1 },
{PhysicalUnit.l, 1000 },
{PhysicalUnit.Gram, 1 },
{PhysicalUnit.KiloGram, 1000 },
{PhysicalUnit.Ton, 1000000 },
{PhysicalUnit.CentiLiters, 0.1f },
{PhysicalUnit.MiliLiters, 1 },
{PhysicalUnit.Liters, 1000 },
};
public static double GetUnitFactor(PhysicalUnit unit)
{
Expand Down

0 comments on commit 9c30cf6

Please sign in to comment.