public static string GetAbbreviation(ElectricChargeDensityUnit unit, [CanBeNull] IFormatProvider provider)
        {
            provider = provider ?? UnitSystem.DefaultCulture;

            return(UnitSystem.GetCached(provider).GetDefaultAbbreviation(unit));
        }
Esempio n. 2
0
 /// <inheritdoc />
 IQuantity IQuantity.ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 3
0
 public static string GetAbbreviation(ElectricResistanceUnit unit, CultureInfo culture = null)
 {
     return(UnitSystem.GetCached(culture).GetDefaultAbbreviation(unit));
 }
Esempio n. 4
0
 public static string GetAbbreviation(MassFlowUnit unit, [CanBeNull] Culture culture)
 {
     return(UnitSystem.GetCached(culture).GetDefaultAbbreviation(unit));
 }
Esempio n. 5
0
 IQuantity <ApparentPowerUnit> IQuantity <ApparentPowerUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 6
0
 IQuantity <IrradiationUnit> IQuantity <IrradiationUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 7
0
 /// <inheritdoc />
 IQuantity <ElectricPotentialDcUnit> IQuantity <ElectricPotentialDcUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 8
0
        public static string GetAbbreviation(PowerRatioUnit unit, [CanBeNull] IFormatProvider provider)
        {
            provider = provider ?? UnitSystem.DefaultCulture;

            return(UnitSystem.GetCached(provider).GetDefaultAbbreviation(unit));
        }
Esempio n. 9
0
 public static string GetAbbreviation(ElectricConductivityUnit unit, [CanBeNull] Culture culture)
 {
     return(UnitSystem.GetCached(culture).GetDefaultAbbreviation(unit));
 }
Esempio n. 10
0
 IQuantity <MagneticFluxUnit> IQuantity <MagneticFluxUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 11
0
 /// <inheritdoc />
 IQuantity <ElectricResistanceUnit> IQuantity <ElectricResistanceUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 12
0
 /// <inheritdoc />
 IQuantity <ForcePerLengthUnit> IQuantity <ForcePerLengthUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 13
0
 IQuantity <ApparentEnergyUnit> IQuantity <ApparentEnergyUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 14
0
 /// <inheritdoc />
 IQuantity <SpecificEnergyUnit> IQuantity <SpecificEnergyUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 15
0
 /// <inheritdoc />
 IQuantity <LapseRateUnit> IQuantity <LapseRateUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 16
0
 IQuantity <VolumePerLengthUnit> IQuantity <VolumePerLengthUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 17
0
 /// <inheritdoc />
 IQuantity <AmountOfSubstanceUnit> IQuantity <AmountOfSubstanceUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 18
0
 IQuantity <LevelUnit> IQuantity <LevelUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 19
0
 IQuantity <PermeabilityUnit> IQuantity <PermeabilityUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 20
0
 /// <inheritdoc />
 IQuantity <MassFluxUnit> IQuantity <MassFluxUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 21
0
 /// <inheritdoc />
 IQuantity <ElectricChargeDensityUnit> IQuantity <ElectricChargeDensityUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 22
0
 public static string GetAbbreviation(DensityUnit unit, CultureInfo culture = null)
 {
     return(UnitSystem.GetCached(culture).GetDefaultAbbreviation(unit));
 }
 IQuantity <ForceChangeRateUnit> IQuantity <ForceChangeRateUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 24
0
 IQuantity <LuminousFluxUnit> IQuantity <LuminousFluxUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 25
0
 IQuantity <ElectricConductivityUnit> IQuantity <ElectricConductivityUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
 IQuantity <RelativeHumidityUnit> IQuantity <RelativeHumidityUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 27
0
 IQuantity <TemperatureDeltaUnit> IQuantity <TemperatureDeltaUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
 IQuantity <ReactiveEnergyUnit> IQuantity <ReactiveEnergyUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 29
0
 IQuantity <ElectricCurrentDensityUnit> IQuantity <ElectricCurrentDensityUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
Esempio n. 30
0
        /// <summary>
        ///     Create a unit system for parsing and presenting numbers, units and abbreviations.
        ///     If null is passed then <see cref="CultureInfo.CurrentUICulture" /> will be used.
        /// </summary>
        /// <param name="cultureInfo"></param>
        /// <returns></returns>
        public static UnitSystem Create(CultureInfo cultureInfo)
        {
            if (cultureInfo == null)
                cultureInfo = CultureInfo.CurrentUICulture;

            if (!CultureToInstance.ContainsKey(cultureInfo))
                CultureToInstance[cultureInfo] = new UnitSystem(cultureInfo);

            return CultureToInstance[cultureInfo];
        }
Esempio n. 31
0
 IQuantity <SpecificVolumeUnit> IQuantity <SpecificVolumeUnit> .ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);