-
Notifications
You must be signed in to change notification settings - Fork 401
Closed
Labels
Description
I cannot set the QuantiyName for a custom Unit because the constructor is internal.
This is the code exampe in this repo:
public QuantityInfo QuantityInfo => new(
nameof(HowMuch),
typeof(HowMuchUnit),
new UnitInfo[]
{
new UnitInfo<HowMuchUnit>(HowMuchUnit.Some, "Some", BaseUnits.Undefined, nameof(HowMuch)),
new UnitInfo<HowMuchUnit>(HowMuchUnit.ATon, "Tons", BaseUnits.Undefined, nameof(HowMuch)),
new UnitInfo<HowMuchUnit>(HowMuchUnit.AShitTon, "ShitTons", BaseUnits.Undefined, nameof(HowMuch)),
},
HowMuchUnit.Some,
Zero,
BaseDimensions.Dimensionless);
But in an other Assembly where i have my custom units, i cannot add the quantity Name to my UnitInfo: