diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs index 66d033f8bc..5c3a6a9c59 100644 --- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs @@ -135,7 +135,7 @@ private void GenerateStaticConstructor() if (baseUnits == null) { Writer.WL($@" - new UnitInfo<{_unitEnumName}>({_unitEnumName}.{unit.SingularName}, ""{unit.PluralName}"", BaseUnits.Undefined),"); + new UnitInfo<{_unitEnumName}>({_unitEnumName}.{unit.SingularName}, ""{unit.PluralName}"", BaseUnits.Undefined, ""{_quantity.Name}""),"); } else { @@ -152,7 +152,7 @@ private void GenerateStaticConstructor() }.Where(str => str != null)); Writer.WL($@" - new UnitInfo<{_unitEnumName}>({_unitEnumName}.{unit.SingularName}, ""{unit.PluralName}"", new BaseUnits({baseUnitsCtorArgs})),"); + new UnitInfo<{_unitEnumName}>({_unitEnumName}.{unit.SingularName}, ""{unit.PluralName}"", new BaseUnits({baseUnitsCtorArgs}), ""{_quantity.Name}""),"); } } @@ -359,25 +359,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) Writer.WL($@" }} - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - {{"); - foreach(Unit unit in _quantity.Units) - { - foreach(Localization localization in unit.Localization) - { - // All units must have a unit abbreviation, so fallback to "" for units with no abbreviations defined in JSON - var abbreviationParams = localization.Abbreviations.Any() ? - string.Join(", ", localization.Abbreviations.Select(abbr => $@"""{abbr}""")) : - $@""""""; - - Writer.WL($@" - unitAbbreviationsCache.PerformAbbreviationMapping({_unitEnumName}.{unit.SingularName}, new CultureInfo(""{localization.Culture}""), false, {unit.AllowAbbreviationLookup.ToString().ToLower()}, new string[]{{{abbreviationParams}}});"); - } - } - - Writer.WL($@" - }} - /// /// Get unit abbreviation string. /// diff --git a/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs index f1f19b9165..502437b592 100644 --- a/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs @@ -30,7 +30,7 @@ namespace UnitsNet /// /// Dynamically parse or construct quantities when types are only known at runtime. /// - public static partial class Quantity + public partial class Quantity { /// /// All QuantityInfo instances mapped by quantity name that are present in UnitsNet by default. @@ -63,7 +63,7 @@ public static IQuantity FromQuantityInfo(QuantityInfo quantityInfo, QuantityValu Writer.WL(@" _ => throw new ArgumentException($""{quantityInfo.Name} is not a supported quantity."") }; - } + } /// /// Try to dynamically construct a quantity. @@ -74,7 +74,7 @@ public static IQuantity FromQuantityInfo(QuantityInfo quantityInfo, QuantityValu /// True if successful with assigned the value, otherwise false. public static bool TryFrom(QuantityValue value, Enum? unit, [NotNullWhen(true)] out IQuantity? quantity) { - switch (unit) + quantity = unit switch {"); foreach (var quantity in _quantities) { @@ -82,18 +82,14 @@ public static bool TryFrom(QuantityValue value, Enum? unit, [NotNullWhen(true)] var unitTypeName = $"{quantityName}Unit"; var unitValue = unitTypeName.ToCamelCase(); Writer.WL($@" - case {unitTypeName} {unitValue}: - quantity = {quantityName}.From(value, {unitValue}); - return true;"); + {unitTypeName} {unitValue} => {quantityName}.From(value, {unitValue}),"); } Writer.WL(@" - default: - { - quantity = default(IQuantity); - return false; - } - } + _ => null + }; + + return quantity is not null; } /// @@ -125,7 +121,7 @@ public static bool TryParse(IFormatProvider? formatProvider, Type quantityType, Writer.WL(@" _ => false }; - } + } internal static IEnumerable GetQuantityTypes() {"); diff --git a/CodeGen/Generators/UnitsNetGenerator.cs b/CodeGen/Generators/UnitsNetGenerator.cs index 4d75e68006..ca23308212 100644 --- a/CodeGen/Generators/UnitsNetGenerator.cs +++ b/CodeGen/Generators/UnitsNetGenerator.cs @@ -1,6 +1,7 @@ // Licensed under MIT No Attribution, see LICENSE file at the root. // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. +using System.Collections.Generic; using System.IO; using System.Linq; using CodeGen.Generators.UnitsNetGen; @@ -71,6 +72,7 @@ public static void Generate(string rootDir, Quantity[] quantities, QuantityNameT Log.Information(""); GenerateIQuantityTests(quantities, $"{testProjectDir}/GeneratedCode/IQuantityTests.g.cs"); GenerateStaticQuantity(quantities, $"{outputDir}/Quantity.g.cs"); + GenerateResourceFiles(quantities, $"{outputDir}/Resources"); var unitCount = quantities.SelectMany(q => q.Units).Count(); Log.Information(""); @@ -130,5 +132,54 @@ private static void GenerateStaticQuantity(Quantity[] quantities, string filePat File.WriteAllText(filePath, content); Log.Information("✅ Quantity.g.cs"); } + + private static void GenerateResourceFiles(Quantity[] quantities, string resourcesDirectory) + { + foreach(var quantity in quantities) + { + var cultures = new HashSet(); + + foreach(Unit unit in quantity.Units) + { + foreach(Localization localization in unit.Localization) + { + cultures.Add(localization.Culture); + } + } + + foreach(var culture in cultures) + { + var fileName = culture.Equals("en-US", System.StringComparison.InvariantCultureIgnoreCase) ? + $"{resourcesDirectory}/{quantity.Name}.restext" : + $"{resourcesDirectory}/{quantity.Name}.{culture}.restext"; + + using var writer = File.CreateText(fileName); + + foreach(Unit unit in quantity.Units) + { + foreach(Localization localization in unit.Localization) + { + if(localization.Culture == culture) + { + if(localization.Abbreviations.Any()) + { + writer.Write($"{unit.PluralName}="); + + for(int i = 0; i < localization.Abbreviations.Length; i++) + { + writer.Write($"{localization.Abbreviations[i]}"); + + if(i != localization.Abbreviations.Length - 1) + writer.Write(","); + } + + writer.WriteLine(); + } + } + } + } + } + } + } } } diff --git a/UnitsNet/BaseUnits.cs b/UnitsNet/BaseUnits.cs index cd1b580db8..578bc291a0 100644 --- a/UnitsNet/BaseUnits.cs +++ b/UnitsNet/BaseUnits.cs @@ -138,21 +138,28 @@ public override int GetHashCode() /// public override string ToString() { - var sb = new StringBuilder(); - - string GetDefaultAbbreviation(TUnitType? unitOrNull) where TUnitType : struct, Enum => unitOrNull is { } unit - ? UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit) - : "N/A"; - - sb.AppendFormat("[Length]: {0}, ", GetDefaultAbbreviation(Length)); - sb.AppendFormat("[Mass]: {0}, ", GetDefaultAbbreviation(Mass)); - sb.AppendFormat("[Time]: {0}, ", GetDefaultAbbreviation(Time)); - sb.AppendFormat("[Current]: {0}, ", GetDefaultAbbreviation(Current)); - sb.AppendFormat("[Temperature]: {0}, ", GetDefaultAbbreviation(Temperature)); - sb.AppendFormat("[Amount]: {0}, ", GetDefaultAbbreviation(Amount)); - sb.AppendFormat("[LuminousIntensity]: {0}", GetDefaultAbbreviation(LuminousIntensity)); - - return sb.ToString(); + if(!Equals(Undefined)) + { + var sb = new StringBuilder(); + + string GetDefaultAbbreviation(TUnitType? unitOrNull) where TUnitType : struct, Enum => unitOrNull is { } unit + ? UnitAbbreviationsCache.Default.GetDefaultAbbreviation(unit) + : "N/A"; + + sb.AppendFormat("[Length]: {0}, ", GetDefaultAbbreviation(Length)); + sb.AppendFormat("[Mass]: {0}, ", GetDefaultAbbreviation(Mass)); + sb.AppendFormat("[Time]: {0}, ", GetDefaultAbbreviation(Time)); + sb.AppendFormat("[Current]: {0}, ", GetDefaultAbbreviation(Current)); + sb.AppendFormat("[Temperature]: {0}, ", GetDefaultAbbreviation(Temperature)); + sb.AppendFormat("[Amount]: {0}, ", GetDefaultAbbreviation(Amount)); + sb.AppendFormat("[LuminousIntensity]: {0}", GetDefaultAbbreviation(LuminousIntensity)); + + return sb.ToString(); + } + else + { + return "Undefined"; + } } /// diff --git a/UnitsNet/CustomCode/Quantities/Length.extra.cs b/UnitsNet/CustomCode/Quantities/Length.extra.cs index 5e161269a7..7c41035344 100644 --- a/UnitsNet/CustomCode/Quantities/Length.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Length.extra.cs @@ -227,8 +227,8 @@ public string ToString(IFormatProvider? cultureInfo) { cultureInfo = cultureInfo ?? CultureInfo.CurrentCulture; - var footUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(LengthUnit.Foot, cultureInfo); - var inchUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(LengthUnit.Inch, cultureInfo); + var footUnit = Length.GetAbbreviation(LengthUnit.Foot, cultureInfo); + var inchUnit = Length.GetAbbreviation(LengthUnit.Inch, cultureInfo); // Note that it isn't customary to use fractions - one wouldn't say "I am 5 feet and 4.5 inches". // So inches are rounded when converting from base units to feet/inches. diff --git a/UnitsNet/CustomCode/Quantities/Mass.extra.cs b/UnitsNet/CustomCode/Quantities/Mass.extra.cs index 810bce1cb1..e82862fc21 100644 --- a/UnitsNet/CustomCode/Quantities/Mass.extra.cs +++ b/UnitsNet/CustomCode/Quantities/Mass.extra.cs @@ -156,8 +156,8 @@ public string ToString(IFormatProvider? cultureInfo) { cultureInfo = cultureInfo ?? CultureInfo.CurrentCulture; - var stoneUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(MassUnit.Stone, cultureInfo); - var poundUnit = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(MassUnit.Pound, cultureInfo); + var stoneUnit = Mass.GetAbbreviation(MassUnit.Stone, cultureInfo); + var poundUnit = Mass.GetAbbreviation(MassUnit.Pound, cultureInfo); // Note that it isn't customary to use fractions - one wouldn't say "I am 11 stone and 4.5 pounds". // So pounds are rounded here. diff --git a/UnitsNet/CustomCode/Quantity.cs b/UnitsNet/CustomCode/Quantity.cs index d28d8da7f8..c9055717ce 100644 --- a/UnitsNet/CustomCode/Quantity.cs +++ b/UnitsNet/CustomCode/Quantity.cs @@ -2,56 +2,49 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Linq; using UnitsNet.Units; namespace UnitsNet { public partial class Quantity { - private static readonly Lazy InfosLazy; - private static readonly Lazy> UnitTypeAndNameToUnitInfoLazy; - static Quantity() { - ICollection quantityInfos = ByName.Values; - Names = quantityInfos.Select(qt => qt.Name).ToArray(); - - InfosLazy = new Lazy(() => quantityInfos - .OrderBy(quantityInfo => quantityInfo.Name) - .ToArray()); + Default = new QuantityInfoLookup(); + } - UnitTypeAndNameToUnitInfoLazy = new Lazy>(() => - { - return Infos - .SelectMany(quantityInfo => quantityInfo.UnitInfos - .Select(unitInfo => new KeyValuePair<(Type, string), UnitInfo>( - (unitInfo.Value.GetType(), unitInfo.Name), - unitInfo))) - .ToDictionary(x => x.Key, x => x.Value); - }); + private static QuantityInfoLookup Default + { + get; } /// /// All enum value names of , such as "Length" and "Mass". /// - public static string[] Names { get; } + public static string[] Names { get => Default.Names; } /// /// All quantity information objects, such as and . /// - public static QuantityInfo[] Infos => InfosLazy.Value; + public static QuantityInfo[] Infos => Default.Infos; /// /// Get for a given unit enum value. /// - public static UnitInfo GetUnitInfo(Enum unitEnum) => UnitTypeAndNameToUnitInfoLazy.Value[(unitEnum.GetType(), unitEnum.ToString())]; + public static UnitInfo GetUnitInfo(Enum unitEnum) => Default.GetUnitInfo(unitEnum); /// /// Try to get for a given unit enum value. /// public static bool TryGetUnitInfo(Enum unitEnum, [NotNullWhen(true)] out UnitInfo? unitInfo) => - UnitTypeAndNameToUnitInfoLazy.Value.TryGetValue((unitEnum.GetType(), unitEnum.ToString()), out unitInfo); + Default.TryGetUnitInfo(unitEnum, out unitInfo); + + /// + /// + /// + /// + /// + public static void AddUnitInfo(Enum unit, UnitInfo unitInfo) => Default.AddUnitInfo(unit, unitInfo); /// /// Dynamically constructs a quantity from a numeric value and a unit enum value. @@ -62,156 +55,17 @@ public static bool TryGetUnitInfo(Enum unitEnum, [NotNullWhen(true)] out UnitInf /// Unit value is not a known unit enum type. public static IQuantity From(QuantityValue value, Enum unit) { - return TryFrom(value, unit, out IQuantity? quantity) - ? quantity - : throw new UnitNotFoundException($"Unit value {unit} of type {unit.GetType()} is not a known unit enum type. Expected types like UnitsNet.Units.LengthUnit. Did you pass in a custom enum type defined outside the UnitsNet library?"); - } - - /// - /// Dynamically construct a quantity from a value, the quantity name and the unit name. - /// - /// Numeric value. - /// The invariant quantity name, such as "Length". Does not support localization. - /// The invariant unit enum name, such as "Meter". Does not support localization. - /// An object. - /// Unit value is not a known unit enum type. - public static IQuantity From(QuantityValue value, string quantityName, string unitName) - { - // Get enum value for this unit, f.ex. LengthUnit.Meter for unit name "Meter". - return UnitConverter.TryParseUnit(quantityName, unitName, out Enum? unitValue) - ? From(value, unitValue) - : throw new UnitNotFoundException($"Unit [{unitName}] not found for quantity [{quantityName}]."); - } - - /// - /// Dynamically construct a quantity from a numeric value and a unit abbreviation using . - /// - /// - /// This method is currently not optimized for performance and will enumerate all units and their unit abbreviations each time.
- /// Unit abbreviation matching is case-insensitive.
- ///
- /// This will fail if more than one unit across all quantities share the same unit abbreviation.
- /// Prefer or instead. - ///
- /// Numeric value. - /// Unit abbreviation, such as "kg" for . - /// An object. - /// Unit abbreviation is not known. - /// Multiple units found matching the given unit abbreviation. - public static IQuantity FromUnitAbbreviation(QuantityValue value, string unitAbbreviation) => FromUnitAbbreviation(null, value, unitAbbreviation); - - /// - /// Dynamically construct a quantity from a numeric value and a unit abbreviation. - /// - /// - /// This method is currently not optimized for performance and will enumerate all units and their unit abbreviations each time.
- /// Unit abbreviation matching is case-insensitive.
- ///
- /// This will fail if more than one unit across all quantities share the same unit abbreviation.
- /// Prefer or instead. - ///
- /// The format provider to use for lookup. Defaults to if null. - /// Numeric value. - /// Unit abbreviation, such as "kg" for . - /// An object. - /// Unit abbreviation is not known. - /// Multiple units found matching the given unit abbreviation. - public static IQuantity FromUnitAbbreviation(IFormatProvider? formatProvider, QuantityValue value, string unitAbbreviation) - { - // TODO Optimize this with UnitValueAbbreviationLookup via UnitAbbreviationsCache.TryGetUnitValueAbbreviationLookup. - List units = GetUnitsForAbbreviation(formatProvider, unitAbbreviation); - if (units.Count > 1) - { - throw new AmbiguousUnitParseException($"Multiple units found matching the given unit abbreviation: {unitAbbreviation}"); - } - - if (units.Count == 0) - { - throw new UnitNotFoundException($"Unit abbreviation {unitAbbreviation} is not known. Did you pass in a custom unit abbreviation defined outside the UnitsNet library? This is currently not supported."); - } - - Enum unit = units.Single(); - return From(value, unit); + return Default.From(value, unit); } /// public static bool TryFrom(double value, Enum unit, [NotNullWhen(true)] out IQuantity? quantity) { - quantity = default; - - // Implicit cast to QuantityValue would prevent TryFrom from being called, - // so we need to explicitly check this here for double arguments. - return !double.IsNaN(value) && - !double.IsInfinity(value) && - TryFrom((QuantityValue)value, unit, out quantity); - } - - /// - /// Try to dynamically construct a quantity from a value, the quantity name and the unit name. - /// - /// Numeric value. - /// The invariant unit enum name, such as "Meter". Does not support localization. - /// The invariant quantity name, such as "Length". Does not support localization. - /// The constructed quantity, if successful, otherwise null. - /// True if successful with assigned the value, otherwise false. - public static bool TryFrom(double value, string quantityName, string unitName, [NotNullWhen(true)] out IQuantity? quantity) - { - quantity = default; - - return UnitConverter.TryParseUnit(quantityName, unitName, out Enum? unitValue) && - TryFrom(value, unitValue, out quantity); - } - - /// - /// Dynamically construct a quantity from a numeric value and a unit abbreviation using . - /// - /// - /// This method is currently not optimized for performance and will enumerate all units and their unit abbreviations each time.
- /// Unit abbreviation matching is case-insensitive.
- ///
- /// This will fail if more than one unit across all quantities share the same unit abbreviation.
- /// Prefer or instead. - ///
- /// Numeric value. - /// Unit abbreviation, such as "kg" for . - /// The quantity if successful, otherwise null. - /// True if successful. - /// Unit value is not a known unit enum type. - public static bool TryFromUnitAbbreviation(QuantityValue value, string unitAbbreviation, [NotNullWhen(true)] out IQuantity? quantity) => - TryFromUnitAbbreviation(null, value, unitAbbreviation, out quantity); - - /// - /// Dynamically construct a quantity from a numeric value and a unit abbreviation. - /// - /// - /// This method is currently not optimized for performance and will enumerate all units and their unit abbreviations each time.
- /// Unit abbreviation matching is case-insensitive.
- ///
- /// This will fail if more than one unit across all quantities share the same unit abbreviation.
- /// Prefer or instead. - ///
- /// The format provider to use for lookup. Defaults to if null. - /// Numeric value. - /// Unit abbreviation, such as "kg" for . - /// The quantity if successful, otherwise null. - /// True if successful. - /// Unit value is not a known unit enum type. - public static bool TryFromUnitAbbreviation(IFormatProvider? formatProvider, QuantityValue value, string unitAbbreviation, [NotNullWhen(true)] out IQuantity? quantity) - { - // TODO Optimize this with UnitValueAbbreviationLookup via UnitAbbreviationsCache.TryGetUnitValueAbbreviationLookup. - List units = GetUnitsForAbbreviation(formatProvider, unitAbbreviation); - if (units.Count == 1) - { - Enum? unit = units.SingleOrDefault(); - return TryFrom(value, unit, out quantity); - } - - quantity = default; - return false; + return Default.TryFrom(value, unit, out quantity); } /// - public static IQuantity Parse(Type quantityType, string quantityString) => Parse(null, quantityType, quantityString); + public static IQuantity Parse(Type quantityType, string quantityString) => Default.Parse(null, quantityType, quantityString); /// /// Dynamically parse a quantity string representation. @@ -224,18 +78,12 @@ public static bool TryFromUnitAbbreviation(IFormatProvider? formatProvider, Quan /// Type must be of type UnitsNet.IQuantity -or- Type is not a known quantity type. public static IQuantity Parse(IFormatProvider? formatProvider, Type quantityType, string quantityString) { - if (!typeof(IQuantity).IsAssignableFrom(quantityType)) - throw new ArgumentException($"Type {quantityType} must be of type UnitsNet.IQuantity."); - - if (TryParse(formatProvider, quantityType, quantityString, out IQuantity? quantity)) - return quantity; - - throw new UnitNotFoundException($"Quantity string could not be parsed to quantity {quantityType}."); + return Default.Parse(formatProvider, quantityType, quantityString); } /// public static bool TryParse(Type quantityType, string quantityString, [NotNullWhen(true)] out IQuantity? quantity) => - TryParse(null, quantityType, quantityString, out quantity); + Default.TryParse(quantityType, quantityString, out quantity); /// /// Get a list of quantities that has the given base dimensions. @@ -243,7 +91,7 @@ public static bool TryParse(Type quantityType, string quantityString, [NotNullWh /// The base dimensions to match. public static IEnumerable GetQuantitiesWithBaseDimensions(BaseDimensions baseDimensions) { - return InfosLazy.Value.Where(info => info.BaseDimensions.Equals(baseDimensions)); + return Default.GetQuantitiesWithBaseDimensions(baseDimensions); } private static List GetUnitsForAbbreviation(IFormatProvider? formatProvider, string unitAbbreviation) diff --git a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs index 6bb34bf28f..602430476b 100644 --- a/UnitsNet/CustomCode/UnitAbbreviationsCache.cs +++ b/UnitsNet/CustomCode/UnitAbbreviationsCache.cs @@ -5,11 +5,8 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; -using System.Reflection; using UnitsNet.Units; -using UnitTypeToLookup = System.Collections.Generic.Dictionary; - // ReSharper disable once CheckNamespace namespace UnitsNet { @@ -19,8 +16,6 @@ namespace UnitsNet /// public sealed class UnitAbbreviationsCache { - private readonly Dictionary _lookupsForCulture; - /// /// Fallback culture used by and /// if no abbreviations are found with a given culture. @@ -37,14 +32,14 @@ public sealed class UnitAbbreviationsCache /// public static UnitAbbreviationsCache Default { get; } + private QuantityInfoLookup QuantityInfoLookup { get; } + /// /// Create an instance of the cache and load all the abbreviations defined in the library. /// public UnitAbbreviationsCache() { - _lookupsForCulture = new Dictionary(); - - LoadGeneratedAbbreviations(); + QuantityInfoLookup= new QuantityInfoLookup(); } static UnitAbbreviationsCache() @@ -52,15 +47,6 @@ static UnitAbbreviationsCache() Default = new UnitAbbreviationsCache(); } - private void LoadGeneratedAbbreviations() - { - foreach (Type quantity in Quantity.GetQuantityTypes()) - { - var mapGeneratedLocalizationsMethod = quantity.GetMethod(nameof(Length.MapGeneratedLocalizations), BindingFlags.NonPublic | BindingFlags.Static); - mapGeneratedLocalizationsMethod?.Invoke(null, new object[]{this}); - } - } - /// /// Adds one or more unit abbreviation for the given unit enum value. /// This is used to dynamically add abbreviations for existing unit enums such as or to extend with third-party unit enums @@ -147,23 +133,13 @@ public void MapUnitToDefaultAbbreviation(Type unitType, int unitValue, IFormatPr internal void PerformAbbreviationMapping(Enum unitValue, IFormatProvider? formatProvider, bool setAsDefault, bool allowAbbreviationLookup, params string[] abbreviations) { - if (abbreviations == null) - throw new ArgumentNullException(nameof(abbreviations)); - - formatProvider ??= CultureInfo.CurrentCulture; - - if (!_lookupsForCulture.TryGetValue(formatProvider, out var quantitiesForProvider)) - quantitiesForProvider = _lookupsForCulture[formatProvider] = new UnitTypeToLookup(); - - var unitType = unitValue.GetType(); - if (!quantitiesForProvider.TryGetValue(unitType, out var unitToAbbreviations)) - unitToAbbreviations = quantitiesForProvider[unitType] = new UnitValueAbbreviationLookup(); - - var unitValueAsInt = Convert.ToInt32(unitValue); - foreach (var abbr in abbreviations) + if(!QuantityInfoLookup.TryGetUnitInfo(unitValue, out var unitInfo)) { - unitToAbbreviations.Add(unitValueAsInt, abbr, setAsDefault, allowAbbreviationLookup); + unitInfo = new UnitInfo(unitValue, unitValue.ToString(), BaseUnits.Undefined); + QuantityInfoLookup.AddUnitInfo(unitValue, unitInfo); } + + unitInfo.AddAbbreviation(formatProvider, setAsDefault, allowAbbreviationLookup, abbreviations); } /// @@ -177,23 +153,7 @@ internal void PerformAbbreviationMapping(Enum unitValue, IFormatProvider? format public string GetDefaultAbbreviation(TUnitType unit, IFormatProvider? formatProvider = null) where TUnitType : Enum { var unitType = typeof(TUnitType); - - if (!TryGetUnitValueAbbreviationLookup(unitType, formatProvider, out var lookup)) - { - return !Equals(formatProvider, FallbackCulture) - ? GetDefaultAbbreviation(unit, FallbackCulture) - : throw new NotImplementedException($"No abbreviation is specified for {unitType.Name}.{unit}"); - } - - var abbreviations = lookup!.GetAbbreviationsForUnit(unit); - if (abbreviations.Count == 0) - { - return !Equals(formatProvider, FallbackCulture) - ? GetDefaultAbbreviation(unit, FallbackCulture) - : throw new NotImplementedException($"No abbreviation is specified for {unitType.Name}.{unit}"); - } - - return abbreviations.First(); + return GetDefaultAbbreviation(unitType, Convert.ToInt32(unit), formatProvider); } /// @@ -207,22 +167,8 @@ public string GetDefaultAbbreviation(TUnitType unit, IFormatProvider? /// The default unit abbreviation string. public string GetDefaultAbbreviation(Type unitType, int unitValue, IFormatProvider? formatProvider = null) { - if (!TryGetUnitValueAbbreviationLookup(unitType, formatProvider, out var lookup)) - { - return !Equals(formatProvider, FallbackCulture) - ? GetDefaultAbbreviation(unitType, unitValue, FallbackCulture) - : throw new NotImplementedException($"No abbreviation is specified for {unitType.Name} with numeric value {unitValue}."); - } - - var abbreviations = lookup!.GetAbbreviationsForUnit(unitValue); - if (abbreviations.Count == 0) - { - return !Equals(formatProvider, FallbackCulture) - ? GetDefaultAbbreviation(unitType, unitValue, FallbackCulture) - : throw new NotImplementedException($"No abbreviation is specified for {unitType.Name} with numeric value {unitValue}."); - } - - return abbreviations.First(); + var abbreviations = GetUnitAbbreviations(unitType, unitValue, formatProvider); + return abbreviations.Length > 0 ? abbreviations[0] : string.Empty; } /// @@ -248,22 +194,35 @@ public string[] GetUnitAbbreviations(Type unitType, int unitValue, IFormatProvid { formatProvider ??= CultureInfo.CurrentCulture; - if (!TryGetUnitValueAbbreviationLookup(unitType, formatProvider, out var lookup)) + if(TryGetUnitAbbreviations(unitType, unitValue, formatProvider, out var abbreviations)) + return abbreviations; + else + throw new NotImplementedException($"No abbreviation is specified for {unitType.Name} with numeric value {unitValue}."); + } + + /// + /// Get all abbreviations for unit. + /// + /// Enum type for unit. + /// Enum value for unit. + /// The format provider to use for lookup. Defaults to if null. + /// The unit abbreviations associated with unit. + /// True if found, otherwise false. + private bool TryGetUnitAbbreviations(Type unitType, int unitValue, IFormatProvider? formatProvider, out string[] abbreviations) + { + var name = Enum.GetName(unitType, unitValue); + var enumInstance = (Enum)Enum.Parse(unitType, name!); + + if(QuantityInfoLookup.TryGetUnitInfo(enumInstance, out var unitInfo)) { - return !Equals(formatProvider, FallbackCulture) - ? GetUnitAbbreviations(unitType, unitValue, FallbackCulture) - : new string[] { }; + abbreviations = unitInfo.GetAbbreviations(formatProvider!).ToArray(); + return true; } - - var abbreviations = lookup!.GetAbbreviationsForUnit(unitValue); - if (abbreviations.Count == 0) + else { - return !Equals(formatProvider, FallbackCulture) - ? GetUnitAbbreviations(unitType, unitValue, FallbackCulture) - : new string[] { }; + abbreviations = Array.Empty(); + return false; } - - return abbreviations.ToArray(); } /// @@ -274,37 +233,28 @@ public string[] GetUnitAbbreviations(Type unitType, int unitValue, IFormatProvid /// Unit abbreviations associated with unit. public IReadOnlyList GetAllUnitAbbreviationsForQuantity(Type unitEnumType, IFormatProvider? formatProvider = null) { - formatProvider ??= CultureInfo.CurrentCulture; - - if (!TryGetUnitValueAbbreviationLookup(unitEnumType, formatProvider, out var lookup)) - { - return !Equals(formatProvider, FallbackCulture) - ? GetAllUnitAbbreviationsForQuantity(unitEnumType, FallbackCulture) - : new string[] { }; - } - - return lookup!.GetAllUnitAbbreviationsForQuantity(); + var enumValues = Enum.GetValues(unitEnumType).Cast(); + var all = GetStringUnitPairs(enumValues, formatProvider); + return all.Select(pair => pair.Item1).ToList(); } - internal bool TryGetUnitValueAbbreviationLookup(Type unitType, IFormatProvider? formatProvider, out UnitValueAbbreviationLookup? unitToAbbreviations) + internal List<(string Abbreviation, Enum Unit)> GetStringUnitPairs(IEnumerable enumValues, IFormatProvider? formatProvider = null) { - unitToAbbreviations = null; - + var ret = new List<(string, Enum)>(); formatProvider ??= CultureInfo.CurrentCulture; - if (!_lookupsForCulture.TryGetValue(formatProvider, out UnitTypeToLookup? quantitiesForProvider)) - { - return !Equals(formatProvider, FallbackCulture) && - TryGetUnitValueAbbreviationLookup(unitType, FallbackCulture, out unitToAbbreviations); - } - - if (!quantitiesForProvider.TryGetValue(unitType, out unitToAbbreviations)) + foreach(var enumValue in enumValues) { - return !Equals(formatProvider, FallbackCulture) && - TryGetUnitValueAbbreviationLookup(unitType, FallbackCulture, out unitToAbbreviations); + if(TryGetUnitAbbreviations(enumValue.GetType(), Convert.ToInt32(enumValue), formatProvider, out var abbreviations)) + { + foreach(var abbrev in abbreviations) + { + ret.Add((abbrev, enumValue)); + } + } } - return true; + return ret; } } } diff --git a/UnitsNet/CustomCode/UnitParser.cs b/UnitsNet/CustomCode/UnitParser.cs index 66cd8287d0..142ea9273e 100644 --- a/UnitsNet/CustomCode/UnitParser.cs +++ b/UnitsNet/CustomCode/UnitParser.cs @@ -70,35 +70,34 @@ public Enum Parse(string? unitAbbreviation, Type unitType, IFormatProvider? form if (unitAbbreviation == null) throw new ArgumentNullException(nameof(unitAbbreviation)); unitAbbreviation = unitAbbreviation.Trim(); - if (!_unitAbbreviationsCache.TryGetUnitValueAbbreviationLookup(unitType, formatProvider, out var abbreviations)) - throw new UnitNotFoundException($"No abbreviations defined for unit type [{unitType}] for culture [{formatProvider}]."); + var enumValues = Enum.GetValues(unitType).Cast(); + var stringUnitPairs = _unitAbbreviationsCache.GetStringUnitPairs(enumValues, formatProvider); + var matches = stringUnitPairs.Where(pair => pair.Item1.Equals(unitAbbreviation, StringComparison.OrdinalIgnoreCase)).ToArray(); - var unitIntValues = abbreviations!.GetUnitsForAbbreviation(unitAbbreviation, ignoreCase: true); - - if (unitIntValues.Count == 0) + if(matches.Length == 0) { unitAbbreviation = NormalizeUnitString(unitAbbreviation); - unitIntValues = abbreviations.GetUnitsForAbbreviation(unitAbbreviation, ignoreCase: true); + matches = stringUnitPairs.Where(pair => pair.Item1.Equals(unitAbbreviation, StringComparison.OrdinalIgnoreCase)).ToArray(); } // Narrow the search if too many hits, for example Megabar "Mbar" and Millibar "mbar" need to be distinguished - if (unitIntValues.Count > 1) - unitIntValues = abbreviations.GetUnitsForAbbreviation(unitAbbreviation, ignoreCase: false); + if(matches.Length > 1) + matches = stringUnitPairs.Where(pair => pair.Item1.Equals(unitAbbreviation)).ToArray(); - switch (unitIntValues.Count) + switch(matches.Length) { case 1: - return (Enum) Enum.ToObject(unitType, unitIntValues[0]); + return (Enum)Enum.ToObject(unitType, matches[0].Unit); case 0: // Retry with fallback culture, if different. - if (!Equals(formatProvider, UnitAbbreviationsCache.FallbackCulture)) + if(!Equals(formatProvider, UnitAbbreviationsCache.FallbackCulture)) { return Parse(unitAbbreviation, unitType, UnitAbbreviationsCache.FallbackCulture); } throw new UnitNotFoundException($"Unit not found with abbreviation [{unitAbbreviation}] for unit type [{unitType}]."); default: - string unitsCsv = string.Join(", ", unitIntValues.Select(x => Enum.GetName(unitType, x)).ToArray()); + string unitsCsv = string.Join(", ", matches.Select(x => Enum.GetName(unitType, x.Unit)).ToArray()); throw new AmbiguousUnitParseException( $"Cannot parse \"{unitAbbreviation}\" since it could be either of these: {unitsCsv}"); } @@ -197,25 +196,24 @@ public bool TryParse(string? unitAbbreviation, Type unitType, IFormatProvider? f unitAbbreviation = unitAbbreviation.Trim(); unit = default; - if (!_unitAbbreviationsCache.TryGetUnitValueAbbreviationLookup(unitType, formatProvider, out var abbreviations)) - return false; - - var unitIntValues = abbreviations!.GetUnitsForAbbreviation(unitAbbreviation, ignoreCase: true); + var enumValues = Enum.GetValues(unitType).Cast(); + var stringUnitPairs = _unitAbbreviationsCache.GetStringUnitPairs(enumValues, formatProvider); + var matches = stringUnitPairs.Where(pair => pair.Item1.Equals(unitAbbreviation, StringComparison.OrdinalIgnoreCase)).ToArray(); - if (unitIntValues.Count == 0) + if(matches.Length == 0) { unitAbbreviation = NormalizeUnitString(unitAbbreviation); - unitIntValues = abbreviations.GetUnitsForAbbreviation(unitAbbreviation, ignoreCase: true); + matches = stringUnitPairs.Where(pair => pair.Item1.Equals(unitAbbreviation, StringComparison.OrdinalIgnoreCase)).ToArray(); } // Narrow the search if too many hits, for example Megabar "Mbar" and Millibar "mbar" need to be distinguished - if (unitIntValues.Count > 1) - unitIntValues = abbreviations.GetUnitsForAbbreviation(unitAbbreviation, ignoreCase: false); + if(matches.Length > 1) + matches = stringUnitPairs.Where(pair => pair.Item1.Equals(unitAbbreviation)).ToArray(); - if (unitIntValues.Count != 1) + if(matches.Length != 1) return false; - unit = (Enum)Enum.ToObject(unitType, unitIntValues[0]); + unit = (Enum)Enum.ToObject(unitType, matches[ 0 ].Unit); return true; } } diff --git a/UnitsNet/CustomCode/UnitValueAbbreviationLookup.cs b/UnitsNet/CustomCode/UnitValueAbbreviationLookup.cs deleted file mode 100644 index d303658682..0000000000 --- a/UnitsNet/CustomCode/UnitValueAbbreviationLookup.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Licensed under MIT No Attribution, see LICENSE file at the root. -// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. - -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; - -namespace UnitsNet -{ - internal class UnitToAbbreviationMap : ConcurrentDictionary> { } - internal class AbbreviationToUnitMap : ConcurrentDictionary> { } - - internal class UnitValueAbbreviationLookup - { - private readonly UnitToAbbreviationMap _unitToAbbreviationMap = new(); - private readonly AbbreviationToUnitMap _abbreviationToUnitMap = new(); - private readonly AbbreviationToUnitMap _lowerCaseAbbreviationToUnitMap = new(); - private Lazy _allUnitAbbreviationsLazy; - private readonly object _syncRoot = new(); - - public UnitValueAbbreviationLookup() - { - _allUnitAbbreviationsLazy = new Lazy(ComputeAllUnitAbbreviationsValue); - } - - internal IReadOnlyList GetAllUnitAbbreviationsForQuantity() - { - return _allUnitAbbreviationsLazy.Value; - } - - internal IReadOnlyList GetAbbreviationsForUnit(TUnitType unit) where TUnitType : Enum - { - return GetAbbreviationsForUnit(Convert.ToInt32(unit)); - } - - internal IReadOnlyList GetAbbreviationsForUnit(int unit) - { - if (!_unitToAbbreviationMap.TryGetValue(unit, out var abbreviations)) - return new List(0); - - return abbreviations.ToList(); - } - - internal IReadOnlyList GetUnitsForAbbreviation(string abbreviation, bool ignoreCase) - { - var lowerCaseAbbreviation = abbreviation.ToLower(); - var key = ignoreCase ? lowerCaseAbbreviation : abbreviation; - var map = ignoreCase ? _lowerCaseAbbreviationToUnitMap : _abbreviationToUnitMap; - - if (!map.TryGetValue(key, out IReadOnlyList? units)) - return new List(0); - - return units.ToList(); - } - - internal void Add(int unit, string abbreviation, bool setAsDefault = false, bool allowAbbreviationLookup = true) - { - // Restrict concurrency on writes. - // By using ConcurrencyDictionary and immutable IReadOnlyList instances, we don't need to lock on reads. - lock (_syncRoot) - { - var lowerCaseAbbreviation = abbreviation.ToLower(); - - if (allowAbbreviationLookup) - { - _abbreviationToUnitMap.AddOrUpdate(abbreviation, - addValueFactory: _ => new List { unit }, - updateValueFactory: (_, existing) => existing.Append(unit).Distinct().ToList()); - - _lowerCaseAbbreviationToUnitMap.AddOrUpdate(lowerCaseAbbreviation, - addValueFactory: _ => new List { unit }, - updateValueFactory: (_, existing) => existing.Append(unit).Distinct().ToList()); - } - - _unitToAbbreviationMap.AddOrUpdate(unit, - addValueFactory: _ => new List { abbreviation }, - updateValueFactory: (_, existing) => - { - return setAsDefault - ? existing.Where(x => x != abbreviation).Prepend(abbreviation).ToList() - : existing.Where(x => x != abbreviation).Append(abbreviation).ToList(); - }); - - _allUnitAbbreviationsLazy = new Lazy(ComputeAllUnitAbbreviationsValue); - } - } - - private string[] ComputeAllUnitAbbreviationsValue() - { - return _unitToAbbreviationMap.Values.SelectMany(abbreviations => abbreviations).Distinct().ToArray(); - } - } -} diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs index f448e2af59..23e7d42e56 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs @@ -65,20 +65,20 @@ static Acceleration() Info = new QuantityInfo("Acceleration", new UnitInfo[] { - new UnitInfo(AccelerationUnit.CentimeterPerSecondSquared, "CentimetersPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(AccelerationUnit.DecimeterPerSecondSquared, "DecimetersPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(AccelerationUnit.FootPerSecondSquared, "FeetPerSecondSquared", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Second)), - new UnitInfo(AccelerationUnit.InchPerSecondSquared, "InchesPerSecondSquared", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second)), - new UnitInfo(AccelerationUnit.KilometerPerSecondSquared, "KilometersPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(AccelerationUnit.KnotPerHour, "KnotsPerHour", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Hour)), - new UnitInfo(AccelerationUnit.KnotPerMinute, "KnotsPerMinute", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Minute)), - new UnitInfo(AccelerationUnit.KnotPerSecond, "KnotsPerSecond", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Second)), - new UnitInfo(AccelerationUnit.MeterPerSecondSquared, "MetersPerSecondSquared", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second)), - new UnitInfo(AccelerationUnit.MicrometerPerSecondSquared, "MicrometersPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(AccelerationUnit.MillimeterPerSecondSquared, "MillimetersPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(AccelerationUnit.MillistandardGravity, "MillistandardGravity", BaseUnits.Undefined), - new UnitInfo(AccelerationUnit.NanometerPerSecondSquared, "NanometersPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(AccelerationUnit.StandardGravity, "StandardGravity", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second)), + new UnitInfo(AccelerationUnit.CentimeterPerSecondSquared, "CentimetersPerSecondSquared", BaseUnits.Undefined, "Acceleration"), + new UnitInfo(AccelerationUnit.DecimeterPerSecondSquared, "DecimetersPerSecondSquared", BaseUnits.Undefined, "Acceleration"), + new UnitInfo(AccelerationUnit.FootPerSecondSquared, "FeetPerSecondSquared", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Second), "Acceleration"), + new UnitInfo(AccelerationUnit.InchPerSecondSquared, "InchesPerSecondSquared", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second), "Acceleration"), + new UnitInfo(AccelerationUnit.KilometerPerSecondSquared, "KilometersPerSecondSquared", BaseUnits.Undefined, "Acceleration"), + new UnitInfo(AccelerationUnit.KnotPerHour, "KnotsPerHour", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Hour), "Acceleration"), + new UnitInfo(AccelerationUnit.KnotPerMinute, "KnotsPerMinute", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Minute), "Acceleration"), + new UnitInfo(AccelerationUnit.KnotPerSecond, "KnotsPerSecond", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Second), "Acceleration"), + new UnitInfo(AccelerationUnit.MeterPerSecondSquared, "MetersPerSecondSquared", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second), "Acceleration"), + new UnitInfo(AccelerationUnit.MicrometerPerSecondSquared, "MicrometersPerSecondSquared", BaseUnits.Undefined, "Acceleration"), + new UnitInfo(AccelerationUnit.MillimeterPerSecondSquared, "MillimetersPerSecondSquared", BaseUnits.Undefined, "Acceleration"), + new UnitInfo(AccelerationUnit.MillistandardGravity, "MillistandardGravity", BaseUnits.Undefined, "Acceleration"), + new UnitInfo(AccelerationUnit.NanometerPerSecondSquared, "NanometersPerSecondSquared", BaseUnits.Undefined, "Acceleration"), + new UnitInfo(AccelerationUnit.StandardGravity, "StandardGravity", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second), "Acceleration"), }, BaseUnit, Zero, BaseDimensions); @@ -296,38 +296,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(AccelerationUnit.MeterPerSecondSquared, AccelerationUnit.StandardGravity, quantity => quantity.ToUnit(AccelerationUnit.StandardGravity)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.CentimeterPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"cm/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.CentimeterPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"см/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.DecimeterPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"dm/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.DecimeterPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"дм/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.FootPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"ft/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.FootPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"фут/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.InchPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"in/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.InchPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"дюйм/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KilometerPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"km/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KilometerPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"км/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KnotPerHour, new CultureInfo("en-US"), false, true, new string[]{"kn/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KnotPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"узел/час"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KnotPerMinute, new CultureInfo("en-US"), false, true, new string[]{"kn/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KnotPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"узел/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KnotPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kn/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.KnotPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"узел/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MeterPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"m/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MeterPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"м/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MicrometerPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"µm/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MicrometerPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"мкм/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MillimeterPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"mm/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MillimeterPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"мм/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MillistandardGravity, new CultureInfo("en-US"), false, true, new string[]{"mg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.MillistandardGravity, new CultureInfo("ru-RU"), false, true, new string[]{"мg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.NanometerPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"nm/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.NanometerPerSecondSquared, new CultureInfo("ru-RU"), false, true, new string[]{"нм/с²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.StandardGravity, new CultureInfo("en-US"), false, true, new string[]{"g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AccelerationUnit.StandardGravity, new CultureInfo("ru-RU"), false, true, new string[]{"g"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs index 7937aeb386..6800ac70a9 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs @@ -65,21 +65,21 @@ static AmountOfSubstance() Info = new QuantityInfo("AmountOfSubstance", new UnitInfo[] { - new UnitInfo(AmountOfSubstanceUnit.Centimole, "Centimoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.CentipoundMole, "CentipoundMoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.Decimole, "Decimoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.DecipoundMole, "DecipoundMoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.Kilomole, "Kilomoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.KilopoundMole, "KilopoundMoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.Megamole, "Megamoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.Micromole, "Micromoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.MicropoundMole, "MicropoundMoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.Millimole, "Millimoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.MillipoundMole, "MillipoundMoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.Mole, "Moles", new BaseUnits(amount: AmountOfSubstanceUnit.Mole)), - new UnitInfo(AmountOfSubstanceUnit.Nanomole, "Nanomoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.NanopoundMole, "NanopoundMoles", BaseUnits.Undefined), - new UnitInfo(AmountOfSubstanceUnit.PoundMole, "PoundMoles", new BaseUnits(amount: AmountOfSubstanceUnit.PoundMole)), + new UnitInfo(AmountOfSubstanceUnit.Centimole, "Centimoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.CentipoundMole, "CentipoundMoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.Decimole, "Decimoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.DecipoundMole, "DecipoundMoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.Kilomole, "Kilomoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.KilopoundMole, "KilopoundMoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.Megamole, "Megamoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.Micromole, "Micromoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.MicropoundMole, "MicropoundMoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.Millimole, "Millimoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.MillipoundMole, "MillipoundMoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.Mole, "Moles", new BaseUnits(amount: AmountOfSubstanceUnit.Mole), "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.Nanomole, "Nanomoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.NanopoundMole, "NanopoundMoles", BaseUnits.Undefined, "AmountOfSubstance"), + new UnitInfo(AmountOfSubstanceUnit.PoundMole, "PoundMoles", new BaseUnits(amount: AmountOfSubstanceUnit.PoundMole), "AmountOfSubstance"), }, BaseUnit, Zero, BaseDimensions); @@ -304,25 +304,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(AmountOfSubstanceUnit.Mole, AmountOfSubstanceUnit.PoundMole, quantity => quantity.ToUnit(AmountOfSubstanceUnit.PoundMole)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Centimole, new CultureInfo("en-US"), false, true, new string[]{"cmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.CentipoundMole, new CultureInfo("en-US"), false, true, new string[]{"clbmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Decimole, new CultureInfo("en-US"), false, true, new string[]{"dmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.DecipoundMole, new CultureInfo("en-US"), false, true, new string[]{"dlbmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Kilomole, new CultureInfo("en-US"), false, true, new string[]{"kmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.KilopoundMole, new CultureInfo("en-US"), false, true, new string[]{"klbmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Megamole, new CultureInfo("en-US"), false, true, new string[]{"Mmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Micromole, new CultureInfo("en-US"), false, true, new string[]{"µmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.MicropoundMole, new CultureInfo("en-US"), false, true, new string[]{"µlbmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Millimole, new CultureInfo("en-US"), false, true, new string[]{"mmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.MillipoundMole, new CultureInfo("en-US"), false, true, new string[]{"mlbmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Mole, new CultureInfo("en-US"), false, true, new string[]{"mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.Nanomole, new CultureInfo("en-US"), false, true, new string[]{"nmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.NanopoundMole, new CultureInfo("en-US"), false, true, new string[]{"nlbmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmountOfSubstanceUnit.PoundMole, new CultureInfo("en-US"), false, true, new string[]{"lbmol"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs index 969d381adb..65093864f8 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs @@ -65,10 +65,10 @@ static AmplitudeRatio() Info = new QuantityInfo("AmplitudeRatio", new UnitInfo[] { - new UnitInfo(AmplitudeRatioUnit.DecibelMicrovolt, "DecibelMicrovolts", BaseUnits.Undefined), - new UnitInfo(AmplitudeRatioUnit.DecibelMillivolt, "DecibelMillivolts", BaseUnits.Undefined), - new UnitInfo(AmplitudeRatioUnit.DecibelUnloaded, "DecibelsUnloaded", BaseUnits.Undefined), - new UnitInfo(AmplitudeRatioUnit.DecibelVolt, "DecibelVolts", BaseUnits.Undefined), + new UnitInfo(AmplitudeRatioUnit.DecibelMicrovolt, "DecibelMicrovolts", BaseUnits.Undefined, "AmplitudeRatio"), + new UnitInfo(AmplitudeRatioUnit.DecibelMillivolt, "DecibelMillivolts", BaseUnits.Undefined, "AmplitudeRatio"), + new UnitInfo(AmplitudeRatioUnit.DecibelUnloaded, "DecibelsUnloaded", BaseUnits.Undefined, "AmplitudeRatio"), + new UnitInfo(AmplitudeRatioUnit.DecibelVolt, "DecibelVolts", BaseUnits.Undefined, "AmplitudeRatio"), }, BaseUnit, Zero, BaseDimensions); @@ -216,14 +216,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(AmplitudeRatioUnit.DecibelVolt, AmplitudeRatioUnit.DecibelUnloaded, quantity => quantity.ToUnit(AmplitudeRatioUnit.DecibelUnloaded)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(AmplitudeRatioUnit.DecibelMicrovolt, new CultureInfo("en-US"), false, true, new string[]{"dBµV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmplitudeRatioUnit.DecibelMillivolt, new CultureInfo("en-US"), false, true, new string[]{"dBmV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmplitudeRatioUnit.DecibelUnloaded, new CultureInfo("en-US"), false, true, new string[]{"dBu"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AmplitudeRatioUnit.DecibelVolt, new CultureInfo("en-US"), false, true, new string[]{"dBV"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs index b4cda3142d..3e1d8b3176 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs @@ -65,22 +65,22 @@ static Angle() Info = new QuantityInfo("Angle", new UnitInfo[] { - new UnitInfo(AngleUnit.Arcminute, "Arcminutes", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Arcsecond, "Arcseconds", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Centiradian, "Centiradians", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Deciradian, "Deciradians", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Degree, "Degrees", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Gradian, "Gradians", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Microdegree, "Microdegrees", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Microradian, "Microradians", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Millidegree, "Millidegrees", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Milliradian, "Milliradians", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Nanodegree, "Nanodegrees", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Nanoradian, "Nanoradians", BaseUnits.Undefined), - new UnitInfo(AngleUnit.NatoMil, "NatoMils", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Radian, "Radians", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Revolution, "Revolutions", BaseUnits.Undefined), - new UnitInfo(AngleUnit.Tilt, "Tilt", BaseUnits.Undefined), + new UnitInfo(AngleUnit.Arcminute, "Arcminutes", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Arcsecond, "Arcseconds", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Centiradian, "Centiradians", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Deciradian, "Deciradians", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Degree, "Degrees", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Gradian, "Gradians", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Microdegree, "Microdegrees", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Microradian, "Microradians", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Millidegree, "Millidegrees", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Milliradian, "Milliradians", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Nanodegree, "Nanodegrees", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Nanoradian, "Nanoradians", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.NatoMil, "NatoMils", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Radian, "Radians", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Revolution, "Revolutions", BaseUnits.Undefined, "Angle"), + new UnitInfo(AngleUnit.Tilt, "Tilt", BaseUnits.Undefined, "Angle"), }, BaseUnit, Zero, BaseDimensions); @@ -312,38 +312,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(AngleUnit.Degree, AngleUnit.Tilt, quantity => quantity.ToUnit(AngleUnit.Tilt)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Arcminute, new CultureInfo("en-US"), false, true, new string[]{"'", "arcmin", "amin", "min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Arcsecond, new CultureInfo("en-US"), false, true, new string[]{"″", "arcsec", "asec", "sec"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Centiradian, new CultureInfo("en-US"), false, true, new string[]{"crad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Centiradian, new CultureInfo("ru-RU"), false, true, new string[]{"срад"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Deciradian, new CultureInfo("en-US"), false, true, new string[]{"drad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Deciradian, new CultureInfo("ru-RU"), false, true, new string[]{"драд"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Degree, new CultureInfo("en-US"), false, true, new string[]{"°", "deg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Degree, new CultureInfo("ru-RU"), false, true, new string[]{"°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Gradian, new CultureInfo("en-US"), false, true, new string[]{"g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Gradian, new CultureInfo("ru-RU"), false, true, new string[]{"g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Microdegree, new CultureInfo("en-US"), false, true, new string[]{"µ°", "µdeg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Microdegree, new CultureInfo("ru-RU"), false, true, new string[]{"мк°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Microradian, new CultureInfo("en-US"), false, true, new string[]{"µrad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Microradian, new CultureInfo("ru-RU"), false, true, new string[]{"мкрад"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Millidegree, new CultureInfo("en-US"), false, true, new string[]{"m°", "mdeg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Millidegree, new CultureInfo("ru-RU"), false, true, new string[]{"м°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Milliradian, new CultureInfo("en-US"), false, true, new string[]{"mrad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Milliradian, new CultureInfo("ru-RU"), false, true, new string[]{"мрад"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Nanodegree, new CultureInfo("en-US"), false, true, new string[]{"n°", "ndeg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Nanodegree, new CultureInfo("ru-RU"), false, true, new string[]{"н°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Nanoradian, new CultureInfo("en-US"), false, true, new string[]{"nrad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Nanoradian, new CultureInfo("ru-RU"), false, true, new string[]{"нрад"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.NatoMil, new CultureInfo("en-US"), false, true, new string[]{"mil"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Radian, new CultureInfo("en-US"), false, true, new string[]{"rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Radian, new CultureInfo("ru-RU"), false, true, new string[]{"рад"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Revolution, new CultureInfo("en-US"), false, true, new string[]{"r"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Revolution, new CultureInfo("ru-RU"), false, true, new string[]{"r"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AngleUnit.Tilt, new CultureInfo("en-US"), false, true, new string[]{"sin(θ)"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs index ced57734a1..9d9577f0ce 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs @@ -65,9 +65,9 @@ static ApparentEnergy() Info = new QuantityInfo("ApparentEnergy", new UnitInfo[] { - new UnitInfo(ApparentEnergyUnit.KilovoltampereHour, "KilovoltampereHours", BaseUnits.Undefined), - new UnitInfo(ApparentEnergyUnit.MegavoltampereHour, "MegavoltampereHours", BaseUnits.Undefined), - new UnitInfo(ApparentEnergyUnit.VoltampereHour, "VoltampereHours", BaseUnits.Undefined), + new UnitInfo(ApparentEnergyUnit.KilovoltampereHour, "KilovoltampereHours", BaseUnits.Undefined, "ApparentEnergy"), + new UnitInfo(ApparentEnergyUnit.MegavoltampereHour, "MegavoltampereHours", BaseUnits.Undefined, "ApparentEnergy"), + new UnitInfo(ApparentEnergyUnit.VoltampereHour, "VoltampereHours", BaseUnits.Undefined, "ApparentEnergy"), }, BaseUnit, Zero, BaseDimensions); @@ -208,13 +208,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ApparentEnergyUnit.VoltampereHour, ApparentEnergyUnit.MegavoltampereHour, quantity => quantity.ToUnit(ApparentEnergyUnit.MegavoltampereHour)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentEnergyUnit.KilovoltampereHour, new CultureInfo("en-US"), false, true, new string[]{"kVAh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentEnergyUnit.MegavoltampereHour, new CultureInfo("en-US"), false, true, new string[]{"MVAh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentEnergyUnit.VoltampereHour, new CultureInfo("en-US"), false, true, new string[]{"VAh"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs index b2d646fb8c..0643ea8428 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs @@ -65,12 +65,12 @@ static ApparentPower() Info = new QuantityInfo("ApparentPower", new UnitInfo[] { - new UnitInfo(ApparentPowerUnit.Gigavoltampere, "Gigavoltamperes", BaseUnits.Undefined), - new UnitInfo(ApparentPowerUnit.Kilovoltampere, "Kilovoltamperes", BaseUnits.Undefined), - new UnitInfo(ApparentPowerUnit.Megavoltampere, "Megavoltamperes", BaseUnits.Undefined), - new UnitInfo(ApparentPowerUnit.Microvoltampere, "Microvoltamperes", BaseUnits.Undefined), - new UnitInfo(ApparentPowerUnit.Millivoltampere, "Millivoltamperes", BaseUnits.Undefined), - new UnitInfo(ApparentPowerUnit.Voltampere, "Voltamperes", BaseUnits.Undefined), + new UnitInfo(ApparentPowerUnit.Gigavoltampere, "Gigavoltamperes", BaseUnits.Undefined, "ApparentPower"), + new UnitInfo(ApparentPowerUnit.Kilovoltampere, "Kilovoltamperes", BaseUnits.Undefined, "ApparentPower"), + new UnitInfo(ApparentPowerUnit.Megavoltampere, "Megavoltamperes", BaseUnits.Undefined, "ApparentPower"), + new UnitInfo(ApparentPowerUnit.Microvoltampere, "Microvoltamperes", BaseUnits.Undefined, "ApparentPower"), + new UnitInfo(ApparentPowerUnit.Millivoltampere, "Millivoltamperes", BaseUnits.Undefined, "ApparentPower"), + new UnitInfo(ApparentPowerUnit.Voltampere, "Voltamperes", BaseUnits.Undefined, "ApparentPower"), }, BaseUnit, Zero, BaseDimensions); @@ -232,16 +232,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ApparentPowerUnit.Voltampere, ApparentPowerUnit.Millivoltampere, quantity => quantity.ToUnit(ApparentPowerUnit.Millivoltampere)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentPowerUnit.Gigavoltampere, new CultureInfo("en-US"), false, true, new string[]{"GVA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentPowerUnit.Kilovoltampere, new CultureInfo("en-US"), false, true, new string[]{"kVA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentPowerUnit.Megavoltampere, new CultureInfo("en-US"), false, true, new string[]{"MVA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentPowerUnit.Microvoltampere, new CultureInfo("en-US"), false, true, new string[]{"µVA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentPowerUnit.Millivoltampere, new CultureInfo("en-US"), false, true, new string[]{"mVA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ApparentPowerUnit.Voltampere, new CultureInfo("en-US"), false, true, new string[]{"VA"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Area.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.g.cs index 368dc2eeed..ce5d25a380 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.g.cs @@ -65,20 +65,20 @@ static Area() Info = new QuantityInfo("Area", new UnitInfo[] { - new UnitInfo(AreaUnit.Acre, "Acres", BaseUnits.Undefined), - new UnitInfo(AreaUnit.Hectare, "Hectares", BaseUnits.Undefined), - new UnitInfo(AreaUnit.SquareCentimeter, "SquareCentimeters", new BaseUnits(length: LengthUnit.Centimeter)), - new UnitInfo(AreaUnit.SquareDecimeter, "SquareDecimeters", new BaseUnits(length: LengthUnit.Decimeter)), - new UnitInfo(AreaUnit.SquareFoot, "SquareFeet", new BaseUnits(length: LengthUnit.Foot)), - new UnitInfo(AreaUnit.SquareInch, "SquareInches", new BaseUnits(length: LengthUnit.Inch)), - new UnitInfo(AreaUnit.SquareKilometer, "SquareKilometers", new BaseUnits(length: LengthUnit.Kilometer)), - new UnitInfo(AreaUnit.SquareMeter, "SquareMeters", new BaseUnits(length: LengthUnit.Meter)), - new UnitInfo(AreaUnit.SquareMicrometer, "SquareMicrometers", new BaseUnits(length: LengthUnit.Micrometer)), - new UnitInfo(AreaUnit.SquareMile, "SquareMiles", new BaseUnits(length: LengthUnit.Mile)), - new UnitInfo(AreaUnit.SquareMillimeter, "SquareMillimeters", new BaseUnits(length: LengthUnit.Millimeter)), - new UnitInfo(AreaUnit.SquareNauticalMile, "SquareNauticalMiles", BaseUnits.Undefined), - new UnitInfo(AreaUnit.SquareYard, "SquareYards", new BaseUnits(length: LengthUnit.Yard)), - new UnitInfo(AreaUnit.UsSurveySquareFoot, "UsSurveySquareFeet", new BaseUnits(length: LengthUnit.UsSurveyFoot)), + new UnitInfo(AreaUnit.Acre, "Acres", BaseUnits.Undefined, "Area"), + new UnitInfo(AreaUnit.Hectare, "Hectares", BaseUnits.Undefined, "Area"), + new UnitInfo(AreaUnit.SquareCentimeter, "SquareCentimeters", new BaseUnits(length: LengthUnit.Centimeter), "Area"), + new UnitInfo(AreaUnit.SquareDecimeter, "SquareDecimeters", new BaseUnits(length: LengthUnit.Decimeter), "Area"), + new UnitInfo(AreaUnit.SquareFoot, "SquareFeet", new BaseUnits(length: LengthUnit.Foot), "Area"), + new UnitInfo(AreaUnit.SquareInch, "SquareInches", new BaseUnits(length: LengthUnit.Inch), "Area"), + new UnitInfo(AreaUnit.SquareKilometer, "SquareKilometers", new BaseUnits(length: LengthUnit.Kilometer), "Area"), + new UnitInfo(AreaUnit.SquareMeter, "SquareMeters", new BaseUnits(length: LengthUnit.Meter), "Area"), + new UnitInfo(AreaUnit.SquareMicrometer, "SquareMicrometers", new BaseUnits(length: LengthUnit.Micrometer), "Area"), + new UnitInfo(AreaUnit.SquareMile, "SquareMiles", new BaseUnits(length: LengthUnit.Mile), "Area"), + new UnitInfo(AreaUnit.SquareMillimeter, "SquareMillimeters", new BaseUnits(length: LengthUnit.Millimeter), "Area"), + new UnitInfo(AreaUnit.SquareNauticalMile, "SquareNauticalMiles", BaseUnits.Undefined, "Area"), + new UnitInfo(AreaUnit.SquareYard, "SquareYards", new BaseUnits(length: LengthUnit.Yard), "Area"), + new UnitInfo(AreaUnit.UsSurveySquareFoot, "UsSurveySquareFeet", new BaseUnits(length: LengthUnit.UsSurveyFoot), "Area"), }, BaseUnit, Zero, BaseDimensions); @@ -296,51 +296,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(AreaUnit.SquareMeter, AreaUnit.UsSurveySquareFoot, quantity => quantity.ToUnit(AreaUnit.UsSurveySquareFoot)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.Acre, new CultureInfo("en-US"), false, true, new string[]{"ac"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.Acre, new CultureInfo("ru-RU"), false, true, new string[]{"акр"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.Acre, new CultureInfo("zh-CN"), false, true, new string[]{"英亩"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.Hectare, new CultureInfo("en-US"), false, true, new string[]{"ha"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.Hectare, new CultureInfo("ru-RU"), false, true, new string[]{"га"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.Hectare, new CultureInfo("zh-CN"), false, true, new string[]{"英亩"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareCentimeter, new CultureInfo("ru-RU"), false, true, new string[]{"см²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareCentimeter, new CultureInfo("zh-CN"), false, true, new string[]{"平方厘米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"dm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareDecimeter, new CultureInfo("ru-RU"), false, true, new string[]{"дм²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareDecimeter, new CultureInfo("zh-CN"), false, true, new string[]{"平方分米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareFoot, new CultureInfo("en-US"), false, true, new string[]{"ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareFoot, new CultureInfo("ru-RU"), false, true, new string[]{"фут²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareFoot, new CultureInfo("zh-CN"), false, true, new string[]{"平方英尺"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareInch, new CultureInfo("en-US"), false, true, new string[]{"in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareInch, new CultureInfo("ru-RU"), false, true, new string[]{"дюйм²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareInch, new CultureInfo("zh-CN"), false, true, new string[]{"平方英寸"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareKilometer, new CultureInfo("en-US"), false, true, new string[]{"km²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareKilometer, new CultureInfo("ru-RU"), false, true, new string[]{"км²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareKilometer, new CultureInfo("zh-CN"), false, true, new string[]{"平方公里"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMeter, new CultureInfo("en-US"), false, true, new string[]{"m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMeter, new CultureInfo("ru-RU"), false, true, new string[]{"м²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMeter, new CultureInfo("zh-CN"), false, true, new string[]{"平方米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMicrometer, new CultureInfo("en-US"), false, true, new string[]{"µm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMicrometer, new CultureInfo("ru-RU"), false, true, new string[]{"мкм²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMicrometer, new CultureInfo("zh-CN"), false, true, new string[]{"平方微米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMile, new CultureInfo("en-US"), false, true, new string[]{"mi²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMile, new CultureInfo("ru-RU"), false, true, new string[]{"миля²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMile, new CultureInfo("zh-CN"), false, true, new string[]{"平方英里"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMillimeter, new CultureInfo("ru-RU"), false, true, new string[]{"мм²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareMillimeter, new CultureInfo("zh-CN"), false, true, new string[]{"平方毫米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareNauticalMile, new CultureInfo("en-US"), false, true, new string[]{"nmi²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareNauticalMile, new CultureInfo("ru-RU"), false, true, new string[]{"морск.миля²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareNauticalMile, new CultureInfo("zh-CN"), false, true, new string[]{"平方海里"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareYard, new CultureInfo("en-US"), false, true, new string[]{"yd²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareYard, new CultureInfo("ru-RU"), false, true, new string[]{"ярд²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.SquareYard, new CultureInfo("zh-CN"), false, true, new string[]{"平方码"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.UsSurveySquareFoot, new CultureInfo("en-US"), false, true, new string[]{"ft² (US)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaUnit.UsSurveySquareFoot, new CultureInfo("ru-RU"), false, true, new string[]{"фут² (US)"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs index bd3eb2c19a..08ea8e79b1 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs @@ -65,9 +65,9 @@ static AreaDensity() Info = new QuantityInfo("AreaDensity", new UnitInfo[] { - new UnitInfo(AreaDensityUnit.GramPerSquareMeter, "GramsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Gram)), - new UnitInfo(AreaDensityUnit.KilogramPerSquareMeter, "KilogramsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram)), - new UnitInfo(AreaDensityUnit.MilligramPerSquareMeter, "MilligramsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Milligram)), + new UnitInfo(AreaDensityUnit.GramPerSquareMeter, "GramsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Gram), "AreaDensity"), + new UnitInfo(AreaDensityUnit.KilogramPerSquareMeter, "KilogramsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram), "AreaDensity"), + new UnitInfo(AreaDensityUnit.MilligramPerSquareMeter, "MilligramsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Milligram), "AreaDensity"), }, BaseUnit, Zero, BaseDimensions); @@ -208,13 +208,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(AreaDensityUnit.KilogramPerSquareMeter, AreaDensityUnit.MilligramPerSquareMeter, quantity => quantity.ToUnit(AreaDensityUnit.MilligramPerSquareMeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(AreaDensityUnit.GramPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"g/m²", "gsm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaDensityUnit.KilogramPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kg/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaDensityUnit.MilligramPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"mg/m²"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs index 100e1f3a4e..71227c04c2 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs @@ -65,12 +65,12 @@ static AreaMomentOfInertia() Info = new QuantityInfo("AreaMomentOfInertia", new UnitInfo[] { - new UnitInfo(AreaMomentOfInertiaUnit.CentimeterToTheFourth, "CentimetersToTheFourth", new BaseUnits(length: LengthUnit.Centimeter)), - new UnitInfo(AreaMomentOfInertiaUnit.DecimeterToTheFourth, "DecimetersToTheFourth", new BaseUnits(length: LengthUnit.Decimeter)), - new UnitInfo(AreaMomentOfInertiaUnit.FootToTheFourth, "FeetToTheFourth", new BaseUnits(length: LengthUnit.Foot)), - new UnitInfo(AreaMomentOfInertiaUnit.InchToTheFourth, "InchesToTheFourth", new BaseUnits(length: LengthUnit.Inch)), - new UnitInfo(AreaMomentOfInertiaUnit.MeterToTheFourth, "MetersToTheFourth", new BaseUnits(length: LengthUnit.Meter)), - new UnitInfo(AreaMomentOfInertiaUnit.MillimeterToTheFourth, "MillimetersToTheFourth", new BaseUnits(length: LengthUnit.Millimeter)), + new UnitInfo(AreaMomentOfInertiaUnit.CentimeterToTheFourth, "CentimetersToTheFourth", new BaseUnits(length: LengthUnit.Centimeter), "AreaMomentOfInertia"), + new UnitInfo(AreaMomentOfInertiaUnit.DecimeterToTheFourth, "DecimetersToTheFourth", new BaseUnits(length: LengthUnit.Decimeter), "AreaMomentOfInertia"), + new UnitInfo(AreaMomentOfInertiaUnit.FootToTheFourth, "FeetToTheFourth", new BaseUnits(length: LengthUnit.Foot), "AreaMomentOfInertia"), + new UnitInfo(AreaMomentOfInertiaUnit.InchToTheFourth, "InchesToTheFourth", new BaseUnits(length: LengthUnit.Inch), "AreaMomentOfInertia"), + new UnitInfo(AreaMomentOfInertiaUnit.MeterToTheFourth, "MetersToTheFourth", new BaseUnits(length: LengthUnit.Meter), "AreaMomentOfInertia"), + new UnitInfo(AreaMomentOfInertiaUnit.MillimeterToTheFourth, "MillimetersToTheFourth", new BaseUnits(length: LengthUnit.Millimeter), "AreaMomentOfInertia"), }, BaseUnit, Zero, BaseDimensions); @@ -232,16 +232,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(AreaMomentOfInertiaUnit.MeterToTheFourth, AreaMomentOfInertiaUnit.MillimeterToTheFourth, quantity => quantity.ToUnit(AreaMomentOfInertiaUnit.MillimeterToTheFourth)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(AreaMomentOfInertiaUnit.CentimeterToTheFourth, new CultureInfo("en-US"), false, true, new string[]{"cm⁴", "cm^4"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaMomentOfInertiaUnit.DecimeterToTheFourth, new CultureInfo("en-US"), false, true, new string[]{"dm⁴", "dm^4"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaMomentOfInertiaUnit.FootToTheFourth, new CultureInfo("en-US"), false, true, new string[]{"ft⁴", "ft^4"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaMomentOfInertiaUnit.InchToTheFourth, new CultureInfo("en-US"), false, true, new string[]{"in⁴", "in^4"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaMomentOfInertiaUnit.MeterToTheFourth, new CultureInfo("en-US"), false, true, new string[]{"m⁴", "m^4"}); - unitAbbreviationsCache.PerformAbbreviationMapping(AreaMomentOfInertiaUnit.MillimeterToTheFourth, new CultureInfo("en-US"), false, true, new string[]{"mm⁴", "mm^4"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs index 6444f5e964..1bdf73354a 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs @@ -69,32 +69,32 @@ static BitRate() Info = new QuantityInfo("BitRate", new UnitInfo[] { - new UnitInfo(BitRateUnit.BitPerSecond, "BitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.BytePerSecond, "BytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.ExabitPerSecond, "ExabitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.ExabytePerSecond, "ExabytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.ExbibitPerSecond, "ExbibitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.ExbibytePerSecond, "ExbibytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.GibibitPerSecond, "GibibitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.GibibytePerSecond, "GibibytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.GigabitPerSecond, "GigabitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.GigabytePerSecond, "GigabytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.KibibitPerSecond, "KibibitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.KibibytePerSecond, "KibibytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.KilobitPerSecond, "KilobitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.KilobytePerSecond, "KilobytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.MebibitPerSecond, "MebibitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.MebibytePerSecond, "MebibytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.MegabitPerSecond, "MegabitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.MegabytePerSecond, "MegabytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.PebibitPerSecond, "PebibitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.PebibytePerSecond, "PebibytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.PetabitPerSecond, "PetabitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.PetabytePerSecond, "PetabytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.TebibitPerSecond, "TebibitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.TebibytePerSecond, "TebibytesPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.TerabitPerSecond, "TerabitsPerSecond", BaseUnits.Undefined), - new UnitInfo(BitRateUnit.TerabytePerSecond, "TerabytesPerSecond", BaseUnits.Undefined), + new UnitInfo(BitRateUnit.BitPerSecond, "BitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.BytePerSecond, "BytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.ExabitPerSecond, "ExabitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.ExabytePerSecond, "ExabytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.ExbibitPerSecond, "ExbibitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.ExbibytePerSecond, "ExbibytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.GibibitPerSecond, "GibibitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.GibibytePerSecond, "GibibytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.GigabitPerSecond, "GigabitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.GigabytePerSecond, "GigabytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.KibibitPerSecond, "KibibitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.KibibytePerSecond, "KibibytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.KilobitPerSecond, "KilobitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.KilobytePerSecond, "KilobytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.MebibitPerSecond, "MebibitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.MebibytePerSecond, "MebibytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.MegabitPerSecond, "MegabitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.MegabytePerSecond, "MegabytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.PebibitPerSecond, "PebibitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.PebibytePerSecond, "PebibytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.PetabitPerSecond, "PetabitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.PetabytePerSecond, "PetabytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.TebibitPerSecond, "TebibitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.TebibytePerSecond, "TebibytesPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.TerabitPerSecond, "TerabitsPerSecond", BaseUnits.Undefined, "BitRate"), + new UnitInfo(BitRateUnit.TerabytePerSecond, "TerabytesPerSecond", BaseUnits.Undefined, "BitRate"), }, BaseUnit, Zero, BaseDimensions); @@ -396,36 +396,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(BitRateUnit.BitPerSecond, BitRateUnit.TerabytePerSecond, quantity => quantity.ToUnit(BitRateUnit.TerabytePerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.BitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"bit/s", "bps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.BytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"B/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.ExabitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Ebit/s", "Ebps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.ExabytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"EB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.ExbibitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Eibit/s", "Eibps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.ExbibytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"EiB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.GibibitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Gibit/s", "Gibps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.GibibytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"GiB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.GigabitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Gbit/s", "Gbps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.GigabytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"GB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.KibibitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Kibit/s", "Kibps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.KibibytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"KiB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.KilobitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kbit/s", "kbps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.KilobytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"kB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.MebibitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Mibit/s", "Mibps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.MebibytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"MiB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.MegabitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Mbit/s", "Mbps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.MegabytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"MB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.PebibitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Pibit/s", "Pibps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.PebibytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"PiB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.PetabitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Pbit/s", "Pbps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.PetabytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"PB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.TebibitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Tibit/s", "Tibps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.TebibytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"TiB/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.TerabitPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Tbit/s", "Tbps"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BitRateUnit.TerabytePerSecond, new CultureInfo("en-US"), false, true, new string[]{"TB/s"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs index 61bd08bd7c..a08ca71f09 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs @@ -65,9 +65,9 @@ static BrakeSpecificFuelConsumption() Info = new QuantityInfo("BrakeSpecificFuelConsumption", new UnitInfo[] { - new UnitInfo(BrakeSpecificFuelConsumptionUnit.GramPerKiloWattHour, "GramsPerKiloWattHour", BaseUnits.Undefined), - new UnitInfo(BrakeSpecificFuelConsumptionUnit.KilogramPerJoule, "KilogramsPerJoule", BaseUnits.Undefined), - new UnitInfo(BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour, "PoundsPerMechanicalHorsepowerHour", BaseUnits.Undefined), + new UnitInfo(BrakeSpecificFuelConsumptionUnit.GramPerKiloWattHour, "GramsPerKiloWattHour", BaseUnits.Undefined, "BrakeSpecificFuelConsumption"), + new UnitInfo(BrakeSpecificFuelConsumptionUnit.KilogramPerJoule, "KilogramsPerJoule", BaseUnits.Undefined, "BrakeSpecificFuelConsumption"), + new UnitInfo(BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour, "PoundsPerMechanicalHorsepowerHour", BaseUnits.Undefined, "BrakeSpecificFuelConsumption"), }, BaseUnit, Zero, BaseDimensions); @@ -208,13 +208,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(BrakeSpecificFuelConsumptionUnit.KilogramPerJoule, BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour, quantity => quantity.ToUnit(BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(BrakeSpecificFuelConsumptionUnit.GramPerKiloWattHour, new CultureInfo("en-US"), false, true, new string[]{"g/kWh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BrakeSpecificFuelConsumptionUnit.KilogramPerJoule, new CultureInfo("en-US"), false, true, new string[]{"kg/J"}); - unitAbbreviationsCache.PerformAbbreviationMapping(BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour, new CultureInfo("en-US"), false, true, new string[]{"lb/hph"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs index b30bee2741..b2b1a99888 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs @@ -68,13 +68,13 @@ static Capacitance() Info = new QuantityInfo("Capacitance", new UnitInfo[] { - new UnitInfo(CapacitanceUnit.Farad, "Farads", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(CapacitanceUnit.Kilofarad, "Kilofarads", BaseUnits.Undefined), - new UnitInfo(CapacitanceUnit.Megafarad, "Megafarads", BaseUnits.Undefined), - new UnitInfo(CapacitanceUnit.Microfarad, "Microfarads", BaseUnits.Undefined), - new UnitInfo(CapacitanceUnit.Millifarad, "Millifarads", BaseUnits.Undefined), - new UnitInfo(CapacitanceUnit.Nanofarad, "Nanofarads", BaseUnits.Undefined), - new UnitInfo(CapacitanceUnit.Picofarad, "Picofarads", BaseUnits.Undefined), + new UnitInfo(CapacitanceUnit.Farad, "Farads", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "Capacitance"), + new UnitInfo(CapacitanceUnit.Kilofarad, "Kilofarads", BaseUnits.Undefined, "Capacitance"), + new UnitInfo(CapacitanceUnit.Megafarad, "Megafarads", BaseUnits.Undefined, "Capacitance"), + new UnitInfo(CapacitanceUnit.Microfarad, "Microfarads", BaseUnits.Undefined, "Capacitance"), + new UnitInfo(CapacitanceUnit.Millifarad, "Millifarads", BaseUnits.Undefined, "Capacitance"), + new UnitInfo(CapacitanceUnit.Nanofarad, "Nanofarads", BaseUnits.Undefined, "Capacitance"), + new UnitInfo(CapacitanceUnit.Picofarad, "Picofarads", BaseUnits.Undefined, "Capacitance"), }, BaseUnit, Zero, BaseDimensions); @@ -243,17 +243,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(CapacitanceUnit.Farad, CapacitanceUnit.Picofarad, quantity => quantity.ToUnit(CapacitanceUnit.Picofarad)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(CapacitanceUnit.Farad, new CultureInfo("en-US"), false, true, new string[]{"F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CapacitanceUnit.Kilofarad, new CultureInfo("en-US"), false, true, new string[]{"kF"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CapacitanceUnit.Megafarad, new CultureInfo("en-US"), false, true, new string[]{"MF"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CapacitanceUnit.Microfarad, new CultureInfo("en-US"), false, true, new string[]{"µF"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CapacitanceUnit.Millifarad, new CultureInfo("en-US"), false, true, new string[]{"mF"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CapacitanceUnit.Nanofarad, new CultureInfo("en-US"), false, true, new string[]{"nF"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CapacitanceUnit.Picofarad, new CultureInfo("en-US"), false, true, new string[]{"pF"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs index 509cd8018a..835d4d0164 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs @@ -65,9 +65,9 @@ static CoefficientOfThermalExpansion() Info = new QuantityInfo("CoefficientOfThermalExpansion", new UnitInfo[] { - new UnitInfo(CoefficientOfThermalExpansionUnit.InverseDegreeCelsius, "InverseDegreeCelsius", new BaseUnits(temperature: TemperatureUnit.DegreeCelsius)), - new UnitInfo(CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit, "InverseDegreeFahrenheit", new BaseUnits(temperature: TemperatureUnit.DegreeFahrenheit)), - new UnitInfo(CoefficientOfThermalExpansionUnit.InverseKelvin, "InverseKelvin", new BaseUnits(temperature: TemperatureUnit.Kelvin)), + new UnitInfo(CoefficientOfThermalExpansionUnit.InverseDegreeCelsius, "InverseDegreeCelsius", new BaseUnits(temperature: TemperatureUnit.DegreeCelsius), "CoefficientOfThermalExpansion"), + new UnitInfo(CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit, "InverseDegreeFahrenheit", new BaseUnits(temperature: TemperatureUnit.DegreeFahrenheit), "CoefficientOfThermalExpansion"), + new UnitInfo(CoefficientOfThermalExpansionUnit.InverseKelvin, "InverseKelvin", new BaseUnits(temperature: TemperatureUnit.Kelvin), "CoefficientOfThermalExpansion"), }, BaseUnit, Zero, BaseDimensions); @@ -208,13 +208,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(CoefficientOfThermalExpansionUnit.InverseKelvin, CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit, quantity => quantity.ToUnit(CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(CoefficientOfThermalExpansionUnit.InverseDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"°C⁻¹", "1/°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"°F⁻¹", "1/°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CoefficientOfThermalExpansionUnit.InverseKelvin, new CultureInfo("en-US"), false, true, new string[]{"K⁻¹", "1/K"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs index 9dc6d3682b..4d8594e950 100644 --- a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs @@ -65,13 +65,13 @@ static Compressibility() Info = new QuantityInfo("Compressibility", new UnitInfo[] { - new UnitInfo(CompressibilityUnit.InverseAtmosphere, "InverseAtmospheres", BaseUnits.Undefined), - new UnitInfo(CompressibilityUnit.InverseBar, "InverseBars", BaseUnits.Undefined), - new UnitInfo(CompressibilityUnit.InverseKilopascal, "InverseKilopascals", BaseUnits.Undefined), - new UnitInfo(CompressibilityUnit.InverseMegapascal, "InverseMegapascals", BaseUnits.Undefined), - new UnitInfo(CompressibilityUnit.InverseMillibar, "InverseMillibars", BaseUnits.Undefined), - new UnitInfo(CompressibilityUnit.InversePascal, "InversePascals", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second)), - new UnitInfo(CompressibilityUnit.InversePoundForcePerSquareInch, "InversePoundsForcePerSquareInch", BaseUnits.Undefined), + new UnitInfo(CompressibilityUnit.InverseAtmosphere, "InverseAtmospheres", BaseUnits.Undefined, "Compressibility"), + new UnitInfo(CompressibilityUnit.InverseBar, "InverseBars", BaseUnits.Undefined, "Compressibility"), + new UnitInfo(CompressibilityUnit.InverseKilopascal, "InverseKilopascals", BaseUnits.Undefined, "Compressibility"), + new UnitInfo(CompressibilityUnit.InverseMegapascal, "InverseMegapascals", BaseUnits.Undefined, "Compressibility"), + new UnitInfo(CompressibilityUnit.InverseMillibar, "InverseMillibars", BaseUnits.Undefined, "Compressibility"), + new UnitInfo(CompressibilityUnit.InversePascal, "InversePascals", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second), "Compressibility"), + new UnitInfo(CompressibilityUnit.InversePoundForcePerSquareInch, "InversePoundsForcePerSquareInch", BaseUnits.Undefined, "Compressibility"), }, BaseUnit, Zero, BaseDimensions); @@ -240,17 +240,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(CompressibilityUnit.InversePascal, CompressibilityUnit.InversePoundForcePerSquareInch, quantity => quantity.ToUnit(CompressibilityUnit.InversePoundForcePerSquareInch)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(CompressibilityUnit.InverseAtmosphere, new CultureInfo("en-US"), false, true, new string[]{"atm⁻¹", "1/atm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CompressibilityUnit.InverseBar, new CultureInfo("en-US"), false, true, new string[]{"bar⁻¹", "1/bar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CompressibilityUnit.InverseKilopascal, new CultureInfo("en-US"), false, true, new string[]{"kPa⁻¹", "1/kPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CompressibilityUnit.InverseMegapascal, new CultureInfo("en-US"), false, true, new string[]{"MPa⁻¹", "1/MPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CompressibilityUnit.InverseMillibar, new CultureInfo("en-US"), false, true, new string[]{"mbar⁻¹", "1/mbar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CompressibilityUnit.InversePascal, new CultureInfo("en-US"), false, true, new string[]{"Pa⁻¹", "1/Pa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(CompressibilityUnit.InversePoundForcePerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"psi⁻¹", "1/psi"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Density.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.g.cs index 0eac171657..4305a24257 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.g.cs @@ -68,57 +68,57 @@ static Density() Info = new QuantityInfo("Density", new UnitInfo[] { - new UnitInfo(DensityUnit.CentigramPerDeciliter, "CentigramsPerDeciLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.CentigramPerLiter, "CentigramsPerLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.CentigramPerMilliliter, "CentigramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.DecigramPerDeciliter, "DecigramsPerDeciLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.DecigramPerLiter, "DecigramsPerLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.DecigramPerMilliliter, "DecigramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.GramPerCubicCentimeter, "GramsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram)), - new UnitInfo(DensityUnit.GramPerCubicFoot, "GramsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Gram)), - new UnitInfo(DensityUnit.GramPerCubicInch, "GramsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Gram)), - new UnitInfo(DensityUnit.GramPerCubicMeter, "GramsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Gram)), - new UnitInfo(DensityUnit.GramPerCubicMillimeter, "GramsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Gram)), - new UnitInfo(DensityUnit.GramPerDeciliter, "GramsPerDeciLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.GramPerLiter, "GramsPerLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.GramPerMilliliter, "GramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.KilogramPerCubicCentimeter, "KilogramsPerCubicCentimeter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.KilogramPerCubicMeter, "KilogramsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.KilogramPerCubicMillimeter, "KilogramsPerCubicMillimeter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.KilogramPerLiter, "KilogramsPerLiter", new BaseUnits(length: LengthUnit.Decimeter, mass: MassUnit.Kilogram)), - new UnitInfo(DensityUnit.KilopoundPerCubicFoot, "KilopoundsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(DensityUnit.KilopoundPerCubicInch, "KilopoundsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MicrogramPerCubicMeter, "MicrogramsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MicrogramPerDeciliter, "MicrogramsPerDeciLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MicrogramPerLiter, "MicrogramsPerLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MicrogramPerMilliliter, "MicrogramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MilligramPerCubicMeter, "MilligramsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MilligramPerDeciliter, "MilligramsPerDeciLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MilligramPerLiter, "MilligramsPerLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.MilligramPerMilliliter, "MilligramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.NanogramPerDeciliter, "NanogramsPerDeciLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.NanogramPerLiter, "NanogramsPerLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.NanogramPerMilliliter, "NanogramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.PicogramPerDeciliter, "PicogramsPerDeciLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.PicogramPerLiter, "PicogramsPerLiter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.PicogramPerMilliliter, "PicogramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(DensityUnit.PoundPerCubicCentimeter, "PoundsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Pound)), - new UnitInfo(DensityUnit.PoundPerCubicFoot, "PoundsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Pound)), - new UnitInfo(DensityUnit.PoundPerCubicInch, "PoundsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Pound)), - new UnitInfo(DensityUnit.PoundPerCubicMeter, "PoundsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Pound)), - new UnitInfo(DensityUnit.PoundPerCubicMillimeter, "PoundsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Pound)), - new UnitInfo(DensityUnit.PoundPerImperialGallon, "PoundsPerImperialGallon", BaseUnits.Undefined), - new UnitInfo(DensityUnit.PoundPerUSGallon, "PoundsPerUSGallon", BaseUnits.Undefined), - new UnitInfo(DensityUnit.SlugPerCubicCentimeter, "SlugsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Slug)), - new UnitInfo(DensityUnit.SlugPerCubicFoot, "SlugsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Slug)), - new UnitInfo(DensityUnit.SlugPerCubicInch, "SlugsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Slug)), - new UnitInfo(DensityUnit.SlugPerCubicMeter, "SlugsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Slug)), - new UnitInfo(DensityUnit.SlugPerCubicMillimeter, "SlugsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Slug)), - new UnitInfo(DensityUnit.TonnePerCubicCentimeter, "TonnesPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Tonne)), - new UnitInfo(DensityUnit.TonnePerCubicFoot, "TonnesPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Tonne)), - new UnitInfo(DensityUnit.TonnePerCubicInch, "TonnesPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Tonne)), - new UnitInfo(DensityUnit.TonnePerCubicMeter, "TonnesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Tonne)), - new UnitInfo(DensityUnit.TonnePerCubicMillimeter, "TonnesPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Tonne)), + new UnitInfo(DensityUnit.CentigramPerDeciliter, "CentigramsPerDeciLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.CentigramPerLiter, "CentigramsPerLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.CentigramPerMilliliter, "CentigramsPerMilliliter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.DecigramPerDeciliter, "DecigramsPerDeciLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.DecigramPerLiter, "DecigramsPerLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.DecigramPerMilliliter, "DecigramsPerMilliliter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.GramPerCubicCentimeter, "GramsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram), "Density"), + new UnitInfo(DensityUnit.GramPerCubicFoot, "GramsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Gram), "Density"), + new UnitInfo(DensityUnit.GramPerCubicInch, "GramsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Gram), "Density"), + new UnitInfo(DensityUnit.GramPerCubicMeter, "GramsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Gram), "Density"), + new UnitInfo(DensityUnit.GramPerCubicMillimeter, "GramsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Gram), "Density"), + new UnitInfo(DensityUnit.GramPerDeciliter, "GramsPerDeciLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.GramPerLiter, "GramsPerLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.GramPerMilliliter, "GramsPerMilliliter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.KilogramPerCubicCentimeter, "KilogramsPerCubicCentimeter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.KilogramPerCubicMeter, "KilogramsPerCubicMeter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.KilogramPerCubicMillimeter, "KilogramsPerCubicMillimeter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.KilogramPerLiter, "KilogramsPerLiter", new BaseUnits(length: LengthUnit.Decimeter, mass: MassUnit.Kilogram), "Density"), + new UnitInfo(DensityUnit.KilopoundPerCubicFoot, "KilopoundsPerCubicFoot", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.KilopoundPerCubicInch, "KilopoundsPerCubicInch", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MicrogramPerCubicMeter, "MicrogramsPerCubicMeter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MicrogramPerDeciliter, "MicrogramsPerDeciLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MicrogramPerLiter, "MicrogramsPerLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MicrogramPerMilliliter, "MicrogramsPerMilliliter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MilligramPerCubicMeter, "MilligramsPerCubicMeter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MilligramPerDeciliter, "MilligramsPerDeciLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MilligramPerLiter, "MilligramsPerLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.MilligramPerMilliliter, "MilligramsPerMilliliter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.NanogramPerDeciliter, "NanogramsPerDeciLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.NanogramPerLiter, "NanogramsPerLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.NanogramPerMilliliter, "NanogramsPerMilliliter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.PicogramPerDeciliter, "PicogramsPerDeciLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.PicogramPerLiter, "PicogramsPerLiter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.PicogramPerMilliliter, "PicogramsPerMilliliter", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.PoundPerCubicCentimeter, "PoundsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Pound), "Density"), + new UnitInfo(DensityUnit.PoundPerCubicFoot, "PoundsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Pound), "Density"), + new UnitInfo(DensityUnit.PoundPerCubicInch, "PoundsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Pound), "Density"), + new UnitInfo(DensityUnit.PoundPerCubicMeter, "PoundsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Pound), "Density"), + new UnitInfo(DensityUnit.PoundPerCubicMillimeter, "PoundsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Pound), "Density"), + new UnitInfo(DensityUnit.PoundPerImperialGallon, "PoundsPerImperialGallon", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.PoundPerUSGallon, "PoundsPerUSGallon", BaseUnits.Undefined, "Density"), + new UnitInfo(DensityUnit.SlugPerCubicCentimeter, "SlugsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Slug), "Density"), + new UnitInfo(DensityUnit.SlugPerCubicFoot, "SlugsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Slug), "Density"), + new UnitInfo(DensityUnit.SlugPerCubicInch, "SlugsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Slug), "Density"), + new UnitInfo(DensityUnit.SlugPerCubicMeter, "SlugsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Slug), "Density"), + new UnitInfo(DensityUnit.SlugPerCubicMillimeter, "SlugsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Slug), "Density"), + new UnitInfo(DensityUnit.TonnePerCubicCentimeter, "TonnesPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Tonne), "Density"), + new UnitInfo(DensityUnit.TonnePerCubicFoot, "TonnesPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Tonne), "Density"), + new UnitInfo(DensityUnit.TonnePerCubicInch, "TonnesPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Tonne), "Density"), + new UnitInfo(DensityUnit.TonnePerCubicMeter, "TonnesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Tonne), "Density"), + new UnitInfo(DensityUnit.TonnePerCubicMillimeter, "TonnesPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Tonne), "Density"), }, BaseUnit, Zero, BaseDimensions); @@ -595,65 +595,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(DensityUnit.KilogramPerCubicMeter, DensityUnit.TonnePerCubicMillimeter, quantity => quantity.ToUnit(DensityUnit.TonnePerCubicMillimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.CentigramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"cg/dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.CentigramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"cg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.CentigramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"cg/ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.DecigramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"dg/dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.DecigramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"dg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.DecigramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"dg/ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"g/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"g/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"g/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"g/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"г/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"g/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"g/dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"g/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.GramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"g/ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.KilogramPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kg/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.KilogramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kg/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.KilogramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"кг/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.KilogramPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kg/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.KilogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"kg/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.KilopoundPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"kip/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.KilopoundPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"kip/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MicrogramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"µg/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MicrogramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"мкг/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MicrogramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"µg/dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MicrogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"µg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MicrogramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"µg/ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MilligramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"mg/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MilligramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"мг/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MilligramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"mg/dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MilligramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"mg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.MilligramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"mg/ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.NanogramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"ng/dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.NanogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"ng/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.NanogramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"ng/ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PicogramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"pg/dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PicogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"pg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PicogramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"pg/ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PoundPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"lb/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PoundPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"lb/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PoundPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"lb/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PoundPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"lb/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PoundPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"lb/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PoundPerImperialGallon, new CultureInfo("en-US"), false, true, new string[]{"ppg (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.PoundPerUSGallon, new CultureInfo("en-US"), false, true, new string[]{"ppg (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.SlugPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"slug/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.SlugPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"slug/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.SlugPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"slug/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.SlugPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"slug/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.SlugPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"slug/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.TonnePerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"t/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.TonnePerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"t/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.TonnePerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"t/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.TonnePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"t/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DensityUnit.TonnePerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"t/mm³"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs index 9bb094d8b1..1724a81d75 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs @@ -65,17 +65,17 @@ static Duration() Info = new QuantityInfo("Duration", new UnitInfo[] { - new UnitInfo(DurationUnit.Day, "Days", new BaseUnits(time: DurationUnit.Day)), - new UnitInfo(DurationUnit.Hour, "Hours", new BaseUnits(time: DurationUnit.Hour)), - new UnitInfo(DurationUnit.JulianYear, "JulianYears", new BaseUnits(time: DurationUnit.JulianYear)), - new UnitInfo(DurationUnit.Microsecond, "Microseconds", BaseUnits.Undefined), - new UnitInfo(DurationUnit.Millisecond, "Milliseconds", BaseUnits.Undefined), - new UnitInfo(DurationUnit.Minute, "Minutes", new BaseUnits(time: DurationUnit.Minute)), - new UnitInfo(DurationUnit.Month30, "Months30", new BaseUnits(time: DurationUnit.Month30)), - new UnitInfo(DurationUnit.Nanosecond, "Nanoseconds", BaseUnits.Undefined), - new UnitInfo(DurationUnit.Second, "Seconds", new BaseUnits(time: DurationUnit.Second)), - new UnitInfo(DurationUnit.Week, "Weeks", new BaseUnits(time: DurationUnit.Week)), - new UnitInfo(DurationUnit.Year365, "Years365", new BaseUnits(time: DurationUnit.Year365)), + new UnitInfo(DurationUnit.Day, "Days", new BaseUnits(time: DurationUnit.Day), "Duration"), + new UnitInfo(DurationUnit.Hour, "Hours", new BaseUnits(time: DurationUnit.Hour), "Duration"), + new UnitInfo(DurationUnit.JulianYear, "JulianYears", new BaseUnits(time: DurationUnit.JulianYear), "Duration"), + new UnitInfo(DurationUnit.Microsecond, "Microseconds", BaseUnits.Undefined, "Duration"), + new UnitInfo(DurationUnit.Millisecond, "Milliseconds", BaseUnits.Undefined, "Duration"), + new UnitInfo(DurationUnit.Minute, "Minutes", new BaseUnits(time: DurationUnit.Minute), "Duration"), + new UnitInfo(DurationUnit.Month30, "Months30", new BaseUnits(time: DurationUnit.Month30), "Duration"), + new UnitInfo(DurationUnit.Nanosecond, "Nanoseconds", BaseUnits.Undefined, "Duration"), + new UnitInfo(DurationUnit.Second, "Seconds", new BaseUnits(time: DurationUnit.Second), "Duration"), + new UnitInfo(DurationUnit.Week, "Weeks", new BaseUnits(time: DurationUnit.Week), "Duration"), + new UnitInfo(DurationUnit.Year365, "Years365", new BaseUnits(time: DurationUnit.Year365), "Duration"), }, BaseUnit, Zero, BaseDimensions); @@ -272,31 +272,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(DurationUnit.Second, DurationUnit.Year365, quantity => quantity.ToUnit(DurationUnit.Year365)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Day, new CultureInfo("en-US"), false, true, new string[]{"d", "day", "days"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Day, new CultureInfo("ru-RU"), false, true, new string[]{"сут", "д"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Hour, new CultureInfo("en-US"), false, true, new string[]{"h", "hr", "hrs", "hour", "hours"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Hour, new CultureInfo("ru-RU"), false, true, new string[]{"ч", "час"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.JulianYear, new CultureInfo("en-US"), false, true, new string[]{"jyr", "jyear", "jyears"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Microsecond, new CultureInfo("en-US"), false, true, new string[]{"µs", "µsec", "µsecs", "µsecond", "µseconds"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Microsecond, new CultureInfo("ru-RU"), false, true, new string[]{"мксек", "мкс"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Millisecond, new CultureInfo("en-US"), false, true, new string[]{"ms", "msec", "msecs", "msecond", "mseconds"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Millisecond, new CultureInfo("ru-RU"), false, true, new string[]{"мсек", "мс"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Minute, new CultureInfo("en-US"), false, true, new string[]{"m", "min", "minute", "minutes"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Minute, new CultureInfo("ru-RU"), false, true, new string[]{"мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Month30, new CultureInfo("en-US"), false, true, new string[]{"mo", "month", "months"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Month30, new CultureInfo("ru-RU"), false, true, new string[]{"месяц"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Nanosecond, new CultureInfo("en-US"), false, true, new string[]{"ns", "nsec", "nsecs", "nsecond", "nseconds"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Nanosecond, new CultureInfo("ru-RU"), false, true, new string[]{"нсек", "нс"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Second, new CultureInfo("en-US"), false, true, new string[]{"s", "sec", "secs", "second", "seconds"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Second, new CultureInfo("ru-RU"), false, true, new string[]{"сек", "с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Week, new CultureInfo("en-US"), false, true, new string[]{"wk", "week", "weeks"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Week, new CultureInfo("ru-RU"), false, true, new string[]{"нед"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Year365, new CultureInfo("en-US"), false, true, new string[]{"yr", "year", "years"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DurationUnit.Year365, new CultureInfo("ru-RU"), false, true, new string[]{"год"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs index 3732303070..941695124f 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs @@ -68,16 +68,16 @@ static DynamicViscosity() Info = new QuantityInfo("DynamicViscosity", new UnitInfo[] { - new UnitInfo(DynamicViscosityUnit.Centipoise, "Centipoise", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.MicropascalSecond, "MicropascalSeconds", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.MillipascalSecond, "MillipascalSeconds", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.NewtonSecondPerMeterSquared, "NewtonSecondsPerMeterSquared", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.PascalSecond, "PascalSeconds", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.Poise, "Poise", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.PoundForceSecondPerSquareFoot, "PoundsForceSecondPerSquareFoot", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.PoundForceSecondPerSquareInch, "PoundsForceSecondPerSquareInch", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.PoundPerFootSecond, "PoundsPerFootSecond", BaseUnits.Undefined), - new UnitInfo(DynamicViscosityUnit.Reyn, "Reyns", BaseUnits.Undefined), + new UnitInfo(DynamicViscosityUnit.Centipoise, "Centipoise", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.MicropascalSecond, "MicropascalSeconds", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.MillipascalSecond, "MillipascalSeconds", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.NewtonSecondPerMeterSquared, "NewtonSecondsPerMeterSquared", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.PascalSecond, "PascalSeconds", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.Poise, "Poise", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.PoundForceSecondPerSquareFoot, "PoundsForceSecondPerSquareFoot", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.PoundForceSecondPerSquareInch, "PoundsForceSecondPerSquareInch", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.PoundPerFootSecond, "PoundsPerFootSecond", BaseUnits.Undefined, "DynamicViscosity"), + new UnitInfo(DynamicViscosityUnit.Reyn, "Reyns", BaseUnits.Undefined, "DynamicViscosity"), }, BaseUnit, Zero, BaseDimensions); @@ -267,20 +267,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(DynamicViscosityUnit.NewtonSecondPerMeterSquared, DynamicViscosityUnit.Reyn, quantity => quantity.ToUnit(DynamicViscosityUnit.Reyn)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.Centipoise, new CultureInfo("en-US"), false, true, new string[]{"cP"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.MicropascalSecond, new CultureInfo("en-US"), false, true, new string[]{"µPa·s", "µPaS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.MillipascalSecond, new CultureInfo("en-US"), false, true, new string[]{"mPa·s", "mPaS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.NewtonSecondPerMeterSquared, new CultureInfo("en-US"), false, true, new string[]{"Ns/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.PascalSecond, new CultureInfo("en-US"), false, true, new string[]{"Pa·s", "PaS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.Poise, new CultureInfo("en-US"), false, true, new string[]{"P"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.PoundForceSecondPerSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"lbf·s/ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.PoundForceSecondPerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"lbf·s/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.PoundPerFootSecond, new CultureInfo("en-US"), false, true, new string[]{"lb/ft·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(DynamicViscosityUnit.Reyn, new CultureInfo("en-US"), false, true, new string[]{"reyn"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs index 676cefe537..4dc041c5b0 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs @@ -65,10 +65,10 @@ static ElectricAdmittance() Info = new QuantityInfo("ElectricAdmittance", new UnitInfo[] { - new UnitInfo(ElectricAdmittanceUnit.Microsiemens, "Microsiemens", BaseUnits.Undefined), - new UnitInfo(ElectricAdmittanceUnit.Millisiemens, "Millisiemens", BaseUnits.Undefined), - new UnitInfo(ElectricAdmittanceUnit.Nanosiemens, "Nanosiemens", BaseUnits.Undefined), - new UnitInfo(ElectricAdmittanceUnit.Siemens, "Siemens", BaseUnits.Undefined), + new UnitInfo(ElectricAdmittanceUnit.Microsiemens, "Microsiemens", BaseUnits.Undefined, "ElectricAdmittance"), + new UnitInfo(ElectricAdmittanceUnit.Millisiemens, "Millisiemens", BaseUnits.Undefined, "ElectricAdmittance"), + new UnitInfo(ElectricAdmittanceUnit.Nanosiemens, "Nanosiemens", BaseUnits.Undefined, "ElectricAdmittance"), + new UnitInfo(ElectricAdmittanceUnit.Siemens, "Siemens", BaseUnits.Undefined, "ElectricAdmittance"), }, BaseUnit, Zero, BaseDimensions); @@ -216,14 +216,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricAdmittanceUnit.Siemens, ElectricAdmittanceUnit.Nanosiemens, quantity => quantity.ToUnit(ElectricAdmittanceUnit.Nanosiemens)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricAdmittanceUnit.Microsiemens, new CultureInfo("en-US"), false, true, new string[]{"µS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricAdmittanceUnit.Millisiemens, new CultureInfo("en-US"), false, true, new string[]{"mS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricAdmittanceUnit.Nanosiemens, new CultureInfo("en-US"), false, true, new string[]{"nS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricAdmittanceUnit.Siemens, new CultureInfo("en-US"), false, true, new string[]{"S"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs index bed8124cdd..5e0b4f57ab 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs @@ -68,17 +68,17 @@ static ElectricCharge() Info = new QuantityInfo("ElectricCharge", new UnitInfo[] { - new UnitInfo(ElectricChargeUnit.AmpereHour, "AmpereHours", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.Coulomb, "Coulombs", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.KiloampereHour, "KiloampereHours", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.Kilocoulomb, "Kilocoulombs", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.MegaampereHour, "MegaampereHours", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.Megacoulomb, "Megacoulombs", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.Microcoulomb, "Microcoulombs", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.MilliampereHour, "MilliampereHours", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.Millicoulomb, "Millicoulombs", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.Nanocoulomb, "Nanocoulombs", BaseUnits.Undefined), - new UnitInfo(ElectricChargeUnit.Picocoulomb, "Picocoulombs", BaseUnits.Undefined), + new UnitInfo(ElectricChargeUnit.AmpereHour, "AmpereHours", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.Coulomb, "Coulombs", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.KiloampereHour, "KiloampereHours", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.Kilocoulomb, "Kilocoulombs", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.MegaampereHour, "MegaampereHours", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.Megacoulomb, "Megacoulombs", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.Microcoulomb, "Microcoulombs", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.MilliampereHour, "MilliampereHours", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.Millicoulomb, "Millicoulombs", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.Nanocoulomb, "Nanocoulombs", BaseUnits.Undefined, "ElectricCharge"), + new UnitInfo(ElectricChargeUnit.Picocoulomb, "Picocoulombs", BaseUnits.Undefined, "ElectricCharge"), }, BaseUnit, Zero, BaseDimensions); @@ -275,21 +275,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricChargeUnit.Coulomb, ElectricChargeUnit.Picocoulomb, quantity => quantity.ToUnit(ElectricChargeUnit.Picocoulomb)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.AmpereHour, new CultureInfo("en-US"), false, true, new string[]{"A-h", "Ah"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.Coulomb, new CultureInfo("en-US"), false, true, new string[]{"C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.KiloampereHour, new CultureInfo("en-US"), false, true, new string[]{"kA-h", "kAh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.Kilocoulomb, new CultureInfo("en-US"), false, true, new string[]{"kC"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.MegaampereHour, new CultureInfo("en-US"), false, true, new string[]{"MA-h", "MAh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.Megacoulomb, new CultureInfo("en-US"), false, true, new string[]{"MC"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.Microcoulomb, new CultureInfo("en-US"), false, true, new string[]{"µC"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.MilliampereHour, new CultureInfo("en-US"), false, true, new string[]{"mA-h", "mAh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.Millicoulomb, new CultureInfo("en-US"), false, true, new string[]{"mC"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.Nanocoulomb, new CultureInfo("en-US"), false, true, new string[]{"nC"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeUnit.Picocoulomb, new CultureInfo("en-US"), false, true, new string[]{"pC"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs index d003058b2b..bda8a9efa5 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs @@ -68,7 +68,7 @@ static ElectricChargeDensity() Info = new QuantityInfo("ElectricChargeDensity", new UnitInfo[] { - new UnitInfo(ElectricChargeDensityUnit.CoulombPerCubicMeter, "CoulombsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(ElectricChargeDensityUnit.CoulombPerCubicMeter, "CoulombsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricChargeDensity"), }, BaseUnit, Zero, BaseDimensions); @@ -195,11 +195,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> ElectricChargeDensityUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricChargeDensityUnit.CoulombPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"C/m³"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs index 0969dfe189..6e6994fbdf 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs @@ -68,11 +68,11 @@ static ElectricConductance() Info = new QuantityInfo("ElectricConductance", new UnitInfo[] { - new UnitInfo(ElectricConductanceUnit.Kilosiemens, "Kilosiemens", BaseUnits.Undefined), - new UnitInfo(ElectricConductanceUnit.Microsiemens, "Microsiemens", BaseUnits.Undefined), - new UnitInfo(ElectricConductanceUnit.Millisiemens, "Millisiemens", BaseUnits.Undefined), - new UnitInfo(ElectricConductanceUnit.Nanosiemens, "Nanosiemens", BaseUnits.Undefined), - new UnitInfo(ElectricConductanceUnit.Siemens, "Siemens", BaseUnits.Undefined), + new UnitInfo(ElectricConductanceUnit.Kilosiemens, "Kilosiemens", BaseUnits.Undefined, "ElectricConductance"), + new UnitInfo(ElectricConductanceUnit.Microsiemens, "Microsiemens", BaseUnits.Undefined, "ElectricConductance"), + new UnitInfo(ElectricConductanceUnit.Millisiemens, "Millisiemens", BaseUnits.Undefined, "ElectricConductance"), + new UnitInfo(ElectricConductanceUnit.Nanosiemens, "Nanosiemens", BaseUnits.Undefined, "ElectricConductance"), + new UnitInfo(ElectricConductanceUnit.Siemens, "Siemens", BaseUnits.Undefined, "ElectricConductance"), }, BaseUnit, Zero, BaseDimensions); @@ -227,15 +227,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricConductanceUnit.Siemens, ElectricConductanceUnit.Nanosiemens, quantity => quantity.ToUnit(ElectricConductanceUnit.Nanosiemens)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductanceUnit.Kilosiemens, new CultureInfo("en-US"), false, true, new string[]{"kS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductanceUnit.Microsiemens, new CultureInfo("en-US"), false, true, new string[]{"µS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductanceUnit.Millisiemens, new CultureInfo("en-US"), false, true, new string[]{"mS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductanceUnit.Nanosiemens, new CultureInfo("en-US"), false, true, new string[]{"nS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductanceUnit.Siemens, new CultureInfo("en-US"), false, true, new string[]{"S"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs index 0f771dcc46..fbed3ea436 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs @@ -68,12 +68,12 @@ static ElectricConductivity() Info = new QuantityInfo("ElectricConductivity", new UnitInfo[] { - new UnitInfo(ElectricConductivityUnit.MicrosiemensPerCentimeter, "MicrosiemensPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricConductivityUnit.MillisiemensPerCentimeter, "MillisiemensPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricConductivityUnit.SiemensPerCentimeter, "SiemensPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricConductivityUnit.SiemensPerFoot, "SiemensPerFoot", BaseUnits.Undefined), - new UnitInfo(ElectricConductivityUnit.SiemensPerInch, "SiemensPerInch", BaseUnits.Undefined), - new UnitInfo(ElectricConductivityUnit.SiemensPerMeter, "SiemensPerMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(ElectricConductivityUnit.MicrosiemensPerCentimeter, "MicrosiemensPerCentimeter", BaseUnits.Undefined, "ElectricConductivity"), + new UnitInfo(ElectricConductivityUnit.MillisiemensPerCentimeter, "MillisiemensPerCentimeter", BaseUnits.Undefined, "ElectricConductivity"), + new UnitInfo(ElectricConductivityUnit.SiemensPerCentimeter, "SiemensPerCentimeter", BaseUnits.Undefined, "ElectricConductivity"), + new UnitInfo(ElectricConductivityUnit.SiemensPerFoot, "SiemensPerFoot", BaseUnits.Undefined, "ElectricConductivity"), + new UnitInfo(ElectricConductivityUnit.SiemensPerInch, "SiemensPerInch", BaseUnits.Undefined, "ElectricConductivity"), + new UnitInfo(ElectricConductivityUnit.SiemensPerMeter, "SiemensPerMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricConductivity"), }, BaseUnit, Zero, BaseDimensions); @@ -235,16 +235,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricConductivityUnit.SiemensPerMeter, ElectricConductivityUnit.SiemensPerInch, quantity => quantity.ToUnit(ElectricConductivityUnit.SiemensPerInch)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductivityUnit.MicrosiemensPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"µS/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductivityUnit.MillisiemensPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mS/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductivityUnit.SiemensPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"S/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductivityUnit.SiemensPerFoot, new CultureInfo("en-US"), false, true, new string[]{"S/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductivityUnit.SiemensPerInch, new CultureInfo("en-US"), false, true, new string[]{"S/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricConductivityUnit.SiemensPerMeter, new CultureInfo("en-US"), false, true, new string[]{"S/m"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs index e1e497fde6..d7dac72b66 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs @@ -65,15 +65,15 @@ static ElectricCurrent() Info = new QuantityInfo("ElectricCurrent", new UnitInfo[] { - new UnitInfo(ElectricCurrentUnit.Ampere, "Amperes", new BaseUnits(current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricCurrentUnit.Centiampere, "Centiamperes", BaseUnits.Undefined), - new UnitInfo(ElectricCurrentUnit.Femtoampere, "Femtoamperes", BaseUnits.Undefined), - new UnitInfo(ElectricCurrentUnit.Kiloampere, "Kiloamperes", BaseUnits.Undefined), - new UnitInfo(ElectricCurrentUnit.Megaampere, "Megaamperes", BaseUnits.Undefined), - new UnitInfo(ElectricCurrentUnit.Microampere, "Microamperes", BaseUnits.Undefined), - new UnitInfo(ElectricCurrentUnit.Milliampere, "Milliamperes", BaseUnits.Undefined), - new UnitInfo(ElectricCurrentUnit.Nanoampere, "Nanoamperes", BaseUnits.Undefined), - new UnitInfo(ElectricCurrentUnit.Picoampere, "Picoamperes", BaseUnits.Undefined), + new UnitInfo(ElectricCurrentUnit.Ampere, "Amperes", new BaseUnits(current: ElectricCurrentUnit.Ampere), "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Centiampere, "Centiamperes", BaseUnits.Undefined, "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Femtoampere, "Femtoamperes", BaseUnits.Undefined, "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Kiloampere, "Kiloamperes", BaseUnits.Undefined, "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Megaampere, "Megaamperes", BaseUnits.Undefined, "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Microampere, "Microamperes", BaseUnits.Undefined, "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Milliampere, "Milliamperes", BaseUnits.Undefined, "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Nanoampere, "Nanoamperes", BaseUnits.Undefined, "ElectricCurrent"), + new UnitInfo(ElectricCurrentUnit.Picoampere, "Picoamperes", BaseUnits.Undefined, "ElectricCurrent"), }, BaseUnit, Zero, BaseDimensions); @@ -256,19 +256,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricCurrentUnit.Ampere, ElectricCurrentUnit.Picoampere, quantity => quantity.ToUnit(ElectricCurrentUnit.Picoampere)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Ampere, new CultureInfo("en-US"), false, true, new string[]{"A"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Centiampere, new CultureInfo("en-US"), false, true, new string[]{"cA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Femtoampere, new CultureInfo("en-US"), false, true, new string[]{"fA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Kiloampere, new CultureInfo("en-US"), false, true, new string[]{"kA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Megaampere, new CultureInfo("en-US"), false, true, new string[]{"MA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Microampere, new CultureInfo("en-US"), false, true, new string[]{"µA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Milliampere, new CultureInfo("en-US"), false, true, new string[]{"mA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Nanoampere, new CultureInfo("en-US"), false, true, new string[]{"nA"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentUnit.Picoampere, new CultureInfo("en-US"), false, true, new string[]{"pA"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs index 7f87d89d75..9292c6784a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs @@ -68,9 +68,9 @@ static ElectricCurrentDensity() Info = new QuantityInfo("ElectricCurrentDensity", new UnitInfo[] { - new UnitInfo(ElectricCurrentDensityUnit.AmperePerSquareFoot, "AmperesPerSquareFoot", new BaseUnits(length: LengthUnit.Foot, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricCurrentDensityUnit.AmperePerSquareInch, "AmperesPerSquareInch", new BaseUnits(length: LengthUnit.Inch, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricCurrentDensityUnit.AmperePerSquareMeter, "AmperesPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(ElectricCurrentDensityUnit.AmperePerSquareFoot, "AmperesPerSquareFoot", new BaseUnits(length: LengthUnit.Foot, current: ElectricCurrentUnit.Ampere), "ElectricCurrentDensity"), + new UnitInfo(ElectricCurrentDensityUnit.AmperePerSquareInch, "AmperesPerSquareInch", new BaseUnits(length: LengthUnit.Inch, current: ElectricCurrentUnit.Ampere), "ElectricCurrentDensity"), + new UnitInfo(ElectricCurrentDensityUnit.AmperePerSquareMeter, "AmperesPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, current: ElectricCurrentUnit.Ampere), "ElectricCurrentDensity"), }, BaseUnit, Zero, BaseDimensions); @@ -211,13 +211,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricCurrentDensityUnit.AmperePerSquareMeter, ElectricCurrentDensityUnit.AmperePerSquareInch, quantity => quantity.ToUnit(ElectricCurrentDensityUnit.AmperePerSquareInch)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentDensityUnit.AmperePerSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"A/ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentDensityUnit.AmperePerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"A/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentDensityUnit.AmperePerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"A/m²"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs index d1aadf044a..76d8b139e2 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs @@ -65,10 +65,10 @@ static ElectricCurrentGradient() Info = new QuantityInfo("ElectricCurrentGradient", new UnitInfo[] { - new UnitInfo(ElectricCurrentGradientUnit.AmperePerMicrosecond, "AmperesPerMicrosecond", new BaseUnits(time: DurationUnit.Microsecond, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricCurrentGradientUnit.AmperePerMillisecond, "AmperesPerMillisecond", new BaseUnits(time: DurationUnit.Millisecond, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricCurrentGradientUnit.AmperePerNanosecond, "AmperesPerNanosecond", new BaseUnits(time: DurationUnit.Nanosecond, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricCurrentGradientUnit.AmperePerSecond, "AmperesPerSecond", BaseUnits.Undefined), + new UnitInfo(ElectricCurrentGradientUnit.AmperePerMicrosecond, "AmperesPerMicrosecond", new BaseUnits(time: DurationUnit.Microsecond, current: ElectricCurrentUnit.Ampere), "ElectricCurrentGradient"), + new UnitInfo(ElectricCurrentGradientUnit.AmperePerMillisecond, "AmperesPerMillisecond", new BaseUnits(time: DurationUnit.Millisecond, current: ElectricCurrentUnit.Ampere), "ElectricCurrentGradient"), + new UnitInfo(ElectricCurrentGradientUnit.AmperePerNanosecond, "AmperesPerNanosecond", new BaseUnits(time: DurationUnit.Nanosecond, current: ElectricCurrentUnit.Ampere), "ElectricCurrentGradient"), + new UnitInfo(ElectricCurrentGradientUnit.AmperePerSecond, "AmperesPerSecond", BaseUnits.Undefined, "ElectricCurrentGradient"), }, BaseUnit, Zero, BaseDimensions); @@ -216,14 +216,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricCurrentGradientUnit.AmperePerSecond, ElectricCurrentGradientUnit.AmperePerNanosecond, quantity => quantity.ToUnit(ElectricCurrentGradientUnit.AmperePerNanosecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentGradientUnit.AmperePerMicrosecond, new CultureInfo("en-US"), false, true, new string[]{"A/μs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentGradientUnit.AmperePerMillisecond, new CultureInfo("en-US"), false, true, new string[]{"A/ms"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentGradientUnit.AmperePerNanosecond, new CultureInfo("en-US"), false, true, new string[]{"A/ns"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricCurrentGradientUnit.AmperePerSecond, new CultureInfo("en-US"), false, true, new string[]{"A/s"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs index 50b53bb4a8..6393c98fcf 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs @@ -68,7 +68,7 @@ static ElectricField() Info = new QuantityInfo("ElectricField", new UnitInfo[] { - new UnitInfo(ElectricFieldUnit.VoltPerMeter, "VoltsPerMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(ElectricFieldUnit.VoltPerMeter, "VoltsPerMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricField"), }, BaseUnit, Zero, BaseDimensions); @@ -195,11 +195,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> ElectricFieldUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricFieldUnit.VoltPerMeter, new CultureInfo("en-US"), false, true, new string[]{"V/m"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs index e9ed0530c7..823826b23c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs @@ -68,11 +68,11 @@ static ElectricInductance() Info = new QuantityInfo("ElectricInductance", new UnitInfo[] { - new UnitInfo(ElectricInductanceUnit.Henry, "Henries", BaseUnits.Undefined), - new UnitInfo(ElectricInductanceUnit.Microhenry, "Microhenries", BaseUnits.Undefined), - new UnitInfo(ElectricInductanceUnit.Millihenry, "Millihenries", BaseUnits.Undefined), - new UnitInfo(ElectricInductanceUnit.Nanohenry, "Nanohenries", BaseUnits.Undefined), - new UnitInfo(ElectricInductanceUnit.Picohenry, "Picohenries", BaseUnits.Undefined), + new UnitInfo(ElectricInductanceUnit.Henry, "Henries", BaseUnits.Undefined, "ElectricInductance"), + new UnitInfo(ElectricInductanceUnit.Microhenry, "Microhenries", BaseUnits.Undefined, "ElectricInductance"), + new UnitInfo(ElectricInductanceUnit.Millihenry, "Millihenries", BaseUnits.Undefined, "ElectricInductance"), + new UnitInfo(ElectricInductanceUnit.Nanohenry, "Nanohenries", BaseUnits.Undefined, "ElectricInductance"), + new UnitInfo(ElectricInductanceUnit.Picohenry, "Picohenries", BaseUnits.Undefined, "ElectricInductance"), }, BaseUnit, Zero, BaseDimensions); @@ -227,15 +227,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricInductanceUnit.Henry, ElectricInductanceUnit.Picohenry, quantity => quantity.ToUnit(ElectricInductanceUnit.Picohenry)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricInductanceUnit.Henry, new CultureInfo("en-US"), false, true, new string[]{"H"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricInductanceUnit.Microhenry, new CultureInfo("en-US"), false, true, new string[]{"µH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricInductanceUnit.Millihenry, new CultureInfo("en-US"), false, true, new string[]{"mH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricInductanceUnit.Nanohenry, new CultureInfo("en-US"), false, true, new string[]{"nH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricInductanceUnit.Picohenry, new CultureInfo("en-US"), false, true, new string[]{"pH"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs index 29f9e8b35f..aeb147d0c1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs @@ -65,12 +65,12 @@ static ElectricPotential() Info = new QuantityInfo("ElectricPotential", new UnitInfo[] { - new UnitInfo(ElectricPotentialUnit.Kilovolt, "Kilovolts", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialUnit.Megavolt, "Megavolts", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialUnit.Microvolt, "Microvolts", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialUnit.Millivolt, "Millivolts", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialUnit.Nanovolt, "Nanovolts", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialUnit.Volt, "Volts", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(ElectricPotentialUnit.Kilovolt, "Kilovolts", BaseUnits.Undefined, "ElectricPotential"), + new UnitInfo(ElectricPotentialUnit.Megavolt, "Megavolts", BaseUnits.Undefined, "ElectricPotential"), + new UnitInfo(ElectricPotentialUnit.Microvolt, "Microvolts", BaseUnits.Undefined, "ElectricPotential"), + new UnitInfo(ElectricPotentialUnit.Millivolt, "Millivolts", BaseUnits.Undefined, "ElectricPotential"), + new UnitInfo(ElectricPotentialUnit.Nanovolt, "Nanovolts", BaseUnits.Undefined, "ElectricPotential"), + new UnitInfo(ElectricPotentialUnit.Volt, "Volts", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricPotential"), }, BaseUnit, Zero, BaseDimensions); @@ -232,22 +232,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricPotentialUnit.Volt, ElectricPotentialUnit.Nanovolt, quantity => quantity.ToUnit(ElectricPotentialUnit.Nanovolt)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Kilovolt, new CultureInfo("en-US"), false, true, new string[]{"kV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Kilovolt, new CultureInfo("ru-RU"), false, true, new string[]{"кВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Megavolt, new CultureInfo("en-US"), false, true, new string[]{"MV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Megavolt, new CultureInfo("ru-RU"), false, true, new string[]{"МВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Microvolt, new CultureInfo("en-US"), false, true, new string[]{"µV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Microvolt, new CultureInfo("ru-RU"), false, true, new string[]{"мкВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Millivolt, new CultureInfo("en-US"), false, true, new string[]{"mV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Millivolt, new CultureInfo("ru-RU"), false, true, new string[]{"мВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Nanovolt, new CultureInfo("en-US"), false, true, new string[]{"nV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Nanovolt, new CultureInfo("ru-RU"), false, true, new string[]{"нВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Volt, new CultureInfo("en-US"), false, true, new string[]{"V"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialUnit.Volt, new CultureInfo("ru-RU"), false, true, new string[]{"В"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs index 102bfe9304..d93e2704ec 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs @@ -65,11 +65,11 @@ static ElectricPotentialAc() Info = new QuantityInfo("ElectricPotentialAc", new UnitInfo[] { - new UnitInfo(ElectricPotentialAcUnit.KilovoltAc, "KilovoltsAc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialAcUnit.MegavoltAc, "MegavoltsAc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialAcUnit.MicrovoltAc, "MicrovoltsAc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialAcUnit.MillivoltAc, "MillivoltsAc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialAcUnit.VoltAc, "VoltsAc", BaseUnits.Undefined), + new UnitInfo(ElectricPotentialAcUnit.KilovoltAc, "KilovoltsAc", BaseUnits.Undefined, "ElectricPotentialAc"), + new UnitInfo(ElectricPotentialAcUnit.MegavoltAc, "MegavoltsAc", BaseUnits.Undefined, "ElectricPotentialAc"), + new UnitInfo(ElectricPotentialAcUnit.MicrovoltAc, "MicrovoltsAc", BaseUnits.Undefined, "ElectricPotentialAc"), + new UnitInfo(ElectricPotentialAcUnit.MillivoltAc, "MillivoltsAc", BaseUnits.Undefined, "ElectricPotentialAc"), + new UnitInfo(ElectricPotentialAcUnit.VoltAc, "VoltsAc", BaseUnits.Undefined, "ElectricPotentialAc"), }, BaseUnit, Zero, BaseDimensions); @@ -224,15 +224,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricPotentialAcUnit.VoltAc, ElectricPotentialAcUnit.MillivoltAc, quantity => quantity.ToUnit(ElectricPotentialAcUnit.MillivoltAc)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialAcUnit.KilovoltAc, new CultureInfo("en-US"), false, true, new string[]{"kVac"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialAcUnit.MegavoltAc, new CultureInfo("en-US"), false, true, new string[]{"MVac"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialAcUnit.MicrovoltAc, new CultureInfo("en-US"), false, true, new string[]{"µVac"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialAcUnit.MillivoltAc, new CultureInfo("en-US"), false, true, new string[]{"mVac"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialAcUnit.VoltAc, new CultureInfo("en-US"), false, true, new string[]{"Vac"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs index c562f5df94..cf5f5a64dd 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs @@ -65,26 +65,26 @@ static ElectricPotentialChangeRate() Info = new QuantityInfo("ElectricPotentialChangeRate", new UnitInfo[] { - new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerHour, "KilovoltsPerHours", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerMicrosecond, "KilovoltsPerMicroseconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerMinute, "KilovoltsPerMinutes", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerSecond, "KilovoltsPerSeconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerHour, "MegavoltsPerHours", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerMicrosecond, "MegavoltsPerMicroseconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerMinute, "MegavoltsPerMinutes", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerSecond, "MegavoltsPerSeconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerHour, "MicrovoltsPerHours", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerMicrosecond, "MicrovoltsPerMicroseconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerMinute, "MicrovoltsPerMinutes", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerSecond, "MicrovoltsPerSeconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerHour, "MillivoltsPerHours", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerMicrosecond, "MillivoltsPerMicroseconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerMinute, "MillivoltsPerMinutes", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerSecond, "MillivoltsPerSeconds", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerHour, "VoltsPerHours", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Hour, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerMicrosecond, "VoltsPerMicroseconds", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Microsecond, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerMinute, "VoltsPerMinutes", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Minute, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerSecond, "VoltsPerSeconds", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerHour, "KilovoltsPerHours", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerMicrosecond, "KilovoltsPerMicroseconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerMinute, "KilovoltsPerMinutes", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.KilovoltPerSecond, "KilovoltsPerSeconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerHour, "MegavoltsPerHours", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerMicrosecond, "MegavoltsPerMicroseconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerMinute, "MegavoltsPerMinutes", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MegavoltPerSecond, "MegavoltsPerSeconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerHour, "MicrovoltsPerHours", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerMicrosecond, "MicrovoltsPerMicroseconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerMinute, "MicrovoltsPerMinutes", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MicrovoltPerSecond, "MicrovoltsPerSeconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerHour, "MillivoltsPerHours", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerMicrosecond, "MillivoltsPerMicroseconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerMinute, "MillivoltsPerMinutes", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.MillivoltPerSecond, "MillivoltsPerSeconds", BaseUnits.Undefined, "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerHour, "VoltsPerHours", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Hour, current: ElectricCurrentUnit.Ampere), "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerMicrosecond, "VoltsPerMicroseconds", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Microsecond, current: ElectricCurrentUnit.Ampere), "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerMinute, "VoltsPerMinutes", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Minute, current: ElectricCurrentUnit.Ampere), "ElectricPotentialChangeRate"), + new UnitInfo(ElectricPotentialChangeRateUnit.VoltPerSecond, "VoltsPerSeconds", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricPotentialChangeRate"), }, BaseUnit, Zero, BaseDimensions); @@ -344,30 +344,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricPotentialChangeRateUnit.VoltPerSecond, ElectricPotentialChangeRateUnit.VoltPerMinute, quantity => quantity.ToUnit(ElectricPotentialChangeRateUnit.VoltPerMinute)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.KilovoltPerHour, new CultureInfo("en-US"), false, true, new string[]{"kV/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.KilovoltPerMicrosecond, new CultureInfo("en-US"), false, true, new string[]{"kV/μs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.KilovoltPerMinute, new CultureInfo("en-US"), false, true, new string[]{"kV/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.KilovoltPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kV/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MegavoltPerHour, new CultureInfo("en-US"), false, true, new string[]{"MV/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MegavoltPerMicrosecond, new CultureInfo("en-US"), false, true, new string[]{"MV/μs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MegavoltPerMinute, new CultureInfo("en-US"), false, true, new string[]{"MV/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MegavoltPerSecond, new CultureInfo("en-US"), false, true, new string[]{"MV/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MicrovoltPerHour, new CultureInfo("en-US"), false, true, new string[]{"µV/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MicrovoltPerMicrosecond, new CultureInfo("en-US"), false, true, new string[]{"µV/μs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MicrovoltPerMinute, new CultureInfo("en-US"), false, true, new string[]{"µV/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MicrovoltPerSecond, new CultureInfo("en-US"), false, true, new string[]{"µV/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MillivoltPerHour, new CultureInfo("en-US"), false, true, new string[]{"mV/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MillivoltPerMicrosecond, new CultureInfo("en-US"), false, true, new string[]{"mV/μs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MillivoltPerMinute, new CultureInfo("en-US"), false, true, new string[]{"mV/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.MillivoltPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mV/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.VoltPerHour, new CultureInfo("en-US"), false, true, new string[]{"V/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.VoltPerMicrosecond, new CultureInfo("en-US"), false, true, new string[]{"V/μs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.VoltPerMinute, new CultureInfo("en-US"), false, true, new string[]{"V/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialChangeRateUnit.VoltPerSecond, new CultureInfo("en-US"), false, true, new string[]{"V/s"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs index 210101cc08..f6eeba7cdc 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs @@ -65,11 +65,11 @@ static ElectricPotentialDc() Info = new QuantityInfo("ElectricPotentialDc", new UnitInfo[] { - new UnitInfo(ElectricPotentialDcUnit.KilovoltDc, "KilovoltsDc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialDcUnit.MegavoltDc, "MegavoltsDc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialDcUnit.MicrovoltDc, "MicrovoltsDc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialDcUnit.MillivoltDc, "MillivoltsDc", BaseUnits.Undefined), - new UnitInfo(ElectricPotentialDcUnit.VoltDc, "VoltsDc", BaseUnits.Undefined), + new UnitInfo(ElectricPotentialDcUnit.KilovoltDc, "KilovoltsDc", BaseUnits.Undefined, "ElectricPotentialDc"), + new UnitInfo(ElectricPotentialDcUnit.MegavoltDc, "MegavoltsDc", BaseUnits.Undefined, "ElectricPotentialDc"), + new UnitInfo(ElectricPotentialDcUnit.MicrovoltDc, "MicrovoltsDc", BaseUnits.Undefined, "ElectricPotentialDc"), + new UnitInfo(ElectricPotentialDcUnit.MillivoltDc, "MillivoltsDc", BaseUnits.Undefined, "ElectricPotentialDc"), + new UnitInfo(ElectricPotentialDcUnit.VoltDc, "VoltsDc", BaseUnits.Undefined, "ElectricPotentialDc"), }, BaseUnit, Zero, BaseDimensions); @@ -224,15 +224,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricPotentialDcUnit.VoltDc, ElectricPotentialDcUnit.MillivoltDc, quantity => quantity.ToUnit(ElectricPotentialDcUnit.MillivoltDc)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialDcUnit.KilovoltDc, new CultureInfo("en-US"), false, true, new string[]{"kVdc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialDcUnit.MegavoltDc, new CultureInfo("en-US"), false, true, new string[]{"MVdc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialDcUnit.MicrovoltDc, new CultureInfo("en-US"), false, true, new string[]{"µVdc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialDcUnit.MillivoltDc, new CultureInfo("en-US"), false, true, new string[]{"mVdc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricPotentialDcUnit.VoltDc, new CultureInfo("en-US"), false, true, new string[]{"Vdc"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs index ed228d427a..b5223c4f5e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs @@ -65,13 +65,13 @@ static ElectricResistance() Info = new QuantityInfo("ElectricResistance", new UnitInfo[] { - new UnitInfo(ElectricResistanceUnit.Gigaohm, "Gigaohms", BaseUnits.Undefined), - new UnitInfo(ElectricResistanceUnit.Kiloohm, "Kiloohms", BaseUnits.Undefined), - new UnitInfo(ElectricResistanceUnit.Megaohm, "Megaohms", BaseUnits.Undefined), - new UnitInfo(ElectricResistanceUnit.Microohm, "Microohms", BaseUnits.Undefined), - new UnitInfo(ElectricResistanceUnit.Milliohm, "Milliohms", BaseUnits.Undefined), - new UnitInfo(ElectricResistanceUnit.Ohm, "Ohms", BaseUnits.Undefined), - new UnitInfo(ElectricResistanceUnit.Teraohm, "Teraohms", BaseUnits.Undefined), + new UnitInfo(ElectricResistanceUnit.Gigaohm, "Gigaohms", BaseUnits.Undefined, "ElectricResistance"), + new UnitInfo(ElectricResistanceUnit.Kiloohm, "Kiloohms", BaseUnits.Undefined, "ElectricResistance"), + new UnitInfo(ElectricResistanceUnit.Megaohm, "Megaohms", BaseUnits.Undefined, "ElectricResistance"), + new UnitInfo(ElectricResistanceUnit.Microohm, "Microohms", BaseUnits.Undefined, "ElectricResistance"), + new UnitInfo(ElectricResistanceUnit.Milliohm, "Milliohms", BaseUnits.Undefined, "ElectricResistance"), + new UnitInfo(ElectricResistanceUnit.Ohm, "Ohms", BaseUnits.Undefined, "ElectricResistance"), + new UnitInfo(ElectricResistanceUnit.Teraohm, "Teraohms", BaseUnits.Undefined, "ElectricResistance"), }, BaseUnit, Zero, BaseDimensions); @@ -240,17 +240,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricResistanceUnit.Ohm, ElectricResistanceUnit.Teraohm, quantity => quantity.ToUnit(ElectricResistanceUnit.Teraohm)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistanceUnit.Gigaohm, new CultureInfo("en-US"), false, true, new string[]{"GΩ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistanceUnit.Kiloohm, new CultureInfo("en-US"), false, true, new string[]{"kΩ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistanceUnit.Megaohm, new CultureInfo("en-US"), false, true, new string[]{"MΩ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistanceUnit.Microohm, new CultureInfo("en-US"), false, true, new string[]{"µΩ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistanceUnit.Milliohm, new CultureInfo("en-US"), false, true, new string[]{"mΩ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistanceUnit.Ohm, new CultureInfo("en-US"), false, true, new string[]{"Ω"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistanceUnit.Teraohm, new CultureInfo("en-US"), false, true, new string[]{"TΩ"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs index c88e4b639e..522d0536de 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs @@ -68,20 +68,20 @@ static ElectricResistivity() Info = new QuantityInfo("ElectricResistivity", new UnitInfo[] { - new UnitInfo(ElectricResistivityUnit.KiloohmCentimeter, "KiloohmsCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.KiloohmMeter, "KiloohmMeters", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.MegaohmCentimeter, "MegaohmsCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.MegaohmMeter, "MegaohmMeters", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.MicroohmCentimeter, "MicroohmsCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.MicroohmMeter, "MicroohmMeters", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.MilliohmCentimeter, "MilliohmsCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.MilliohmMeter, "MilliohmMeters", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.NanoohmCentimeter, "NanoohmsCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.NanoohmMeter, "NanoohmMeters", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.OhmCentimeter, "OhmsCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.OhmMeter, "OhmMeters", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.PicoohmCentimeter, "PicoohmsCentimeter", BaseUnits.Undefined), - new UnitInfo(ElectricResistivityUnit.PicoohmMeter, "PicoohmMeters", BaseUnits.Undefined), + new UnitInfo(ElectricResistivityUnit.KiloohmCentimeter, "KiloohmsCentimeter", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.KiloohmMeter, "KiloohmMeters", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.MegaohmCentimeter, "MegaohmsCentimeter", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.MegaohmMeter, "MegaohmMeters", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.MicroohmCentimeter, "MicroohmsCentimeter", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.MicroohmMeter, "MicroohmMeters", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.MilliohmCentimeter, "MilliohmsCentimeter", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.MilliohmMeter, "MilliohmMeters", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.NanoohmCentimeter, "NanoohmsCentimeter", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.NanoohmMeter, "NanoohmMeters", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.OhmCentimeter, "OhmsCentimeter", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.OhmMeter, "OhmMeters", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.PicoohmCentimeter, "PicoohmsCentimeter", BaseUnits.Undefined, "ElectricResistivity"), + new UnitInfo(ElectricResistivityUnit.PicoohmMeter, "PicoohmMeters", BaseUnits.Undefined, "ElectricResistivity"), }, BaseUnit, Zero, BaseDimensions); @@ -299,24 +299,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricResistivityUnit.OhmMeter, ElectricResistivityUnit.PicoohmMeter, quantity => quantity.ToUnit(ElectricResistivityUnit.PicoohmMeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.KiloohmCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kΩ·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.KiloohmMeter, new CultureInfo("en-US"), false, true, new string[]{"kΩ·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.MegaohmCentimeter, new CultureInfo("en-US"), false, true, new string[]{"MΩ·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.MegaohmMeter, new CultureInfo("en-US"), false, true, new string[]{"MΩ·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.MicroohmCentimeter, new CultureInfo("en-US"), false, true, new string[]{"µΩ·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.MicroohmMeter, new CultureInfo("en-US"), false, true, new string[]{"µΩ·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.MilliohmCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mΩ·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.MilliohmMeter, new CultureInfo("en-US"), false, true, new string[]{"mΩ·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.NanoohmCentimeter, new CultureInfo("en-US"), false, true, new string[]{"nΩ·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.NanoohmMeter, new CultureInfo("en-US"), false, true, new string[]{"nΩ·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.OhmCentimeter, new CultureInfo("en-US"), false, true, new string[]{"Ω·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.OhmMeter, new CultureInfo("en-US"), false, true, new string[]{"Ω·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.PicoohmCentimeter, new CultureInfo("en-US"), false, true, new string[]{"pΩ·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricResistivityUnit.PicoohmMeter, new CultureInfo("en-US"), false, true, new string[]{"pΩ·m"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs index 211dd2fb47..146008767d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs @@ -68,9 +68,9 @@ static ElectricSurfaceChargeDensity() Info = new QuantityInfo("ElectricSurfaceChargeDensity", new UnitInfo[] { - new UnitInfo(ElectricSurfaceChargeDensityUnit.CoulombPerSquareCentimeter, "CoulombsPerSquareCentimeter", new BaseUnits(length: LengthUnit.Centimeter, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch, "CoulombsPerSquareInch", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), - new UnitInfo(ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter, "CoulombsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(ElectricSurfaceChargeDensityUnit.CoulombPerSquareCentimeter, "CoulombsPerSquareCentimeter", new BaseUnits(length: LengthUnit.Centimeter, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricSurfaceChargeDensity"), + new UnitInfo(ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch, "CoulombsPerSquareInch", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricSurfaceChargeDensity"), + new UnitInfo(ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter, "CoulombsPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second, current: ElectricCurrentUnit.Ampere), "ElectricSurfaceChargeDensity"), }, BaseUnit, Zero, BaseDimensions); @@ -211,13 +211,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter, ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch, quantity => quantity.ToUnit(ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricSurfaceChargeDensityUnit.CoulombPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"C/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"C/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"C/m²"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs index 90d82917f7..3ad5dd9db6 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs @@ -65,44 +65,44 @@ static Energy() Info = new QuantityInfo("Energy", new UnitInfo[] { - new UnitInfo(EnergyUnit.BritishThermalUnit, "BritishThermalUnits", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Calorie, "Calories", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.DecathermEc, "DecathermsEc", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.DecathermImperial, "DecathermsImperial", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.DecathermUs, "DecathermsUs", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.ElectronVolt, "ElectronVolts", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Erg, "Ergs", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.FootPound, "FootPounds", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.GigabritishThermalUnit, "GigabritishThermalUnits", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.GigaelectronVolt, "GigaelectronVolts", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Gigajoule, "Gigajoules", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.GigawattDay, "GigawattDays", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.GigawattHour, "GigawattHours", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.HorsepowerHour, "HorsepowerHours", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Joule, "Joules", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second)), - new UnitInfo(EnergyUnit.KilobritishThermalUnit, "KilobritishThermalUnits", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Kilocalorie, "Kilocalories", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.KiloelectronVolt, "KiloelectronVolts", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Kilojoule, "Kilojoules", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.KilowattDay, "KilowattDays", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.KilowattHour, "KilowattHours", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.MegabritishThermalUnit, "MegabritishThermalUnits", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Megacalorie, "Megacalories", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.MegaelectronVolt, "MegaelectronVolts", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Megajoule, "Megajoules", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.MegawattDay, "MegawattDays", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.MegawattHour, "MegawattHours", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Millijoule, "Millijoules", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Petajoule, "Petajoules", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.TeraelectronVolt, "TeraelectronVolts", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.Terajoule, "Terajoules", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.TerawattDay, "TerawattDays", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.TerawattHour, "TerawattHours", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.ThermEc, "ThermsEc", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.ThermImperial, "ThermsImperial", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.ThermUs, "ThermsUs", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.WattDay, "WattDays", BaseUnits.Undefined), - new UnitInfo(EnergyUnit.WattHour, "WattHours", BaseUnits.Undefined), + new UnitInfo(EnergyUnit.BritishThermalUnit, "BritishThermalUnits", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Calorie, "Calories", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.DecathermEc, "DecathermsEc", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.DecathermImperial, "DecathermsImperial", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.DecathermUs, "DecathermsUs", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.ElectronVolt, "ElectronVolts", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Erg, "Ergs", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.FootPound, "FootPounds", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.GigabritishThermalUnit, "GigabritishThermalUnits", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.GigaelectronVolt, "GigaelectronVolts", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Gigajoule, "Gigajoules", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.GigawattDay, "GigawattDays", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.GigawattHour, "GigawattHours", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.HorsepowerHour, "HorsepowerHours", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Joule, "Joules", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second), "Energy"), + new UnitInfo(EnergyUnit.KilobritishThermalUnit, "KilobritishThermalUnits", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Kilocalorie, "Kilocalories", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.KiloelectronVolt, "KiloelectronVolts", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Kilojoule, "Kilojoules", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.KilowattDay, "KilowattDays", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.KilowattHour, "KilowattHours", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.MegabritishThermalUnit, "MegabritishThermalUnits", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Megacalorie, "Megacalories", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.MegaelectronVolt, "MegaelectronVolts", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Megajoule, "Megajoules", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.MegawattDay, "MegawattDays", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.MegawattHour, "MegawattHours", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Millijoule, "Millijoules", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Petajoule, "Petajoules", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.TeraelectronVolt, "TeraelectronVolts", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.Terajoule, "Terajoules", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.TerawattDay, "TerawattDays", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.TerawattHour, "TerawattHours", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.ThermEc, "ThermsEc", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.ThermImperial, "ThermsImperial", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.ThermUs, "ThermsUs", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.WattDay, "WattDays", BaseUnits.Undefined, "Energy"), + new UnitInfo(EnergyUnit.WattHour, "WattHours", BaseUnits.Undefined, "Energy"), }, BaseUnit, Zero, BaseDimensions); @@ -488,69 +488,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(EnergyUnit.Joule, EnergyUnit.WattHour, quantity => quantity.ToUnit(EnergyUnit.WattHour)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.BritishThermalUnit, new CultureInfo("en-US"), false, true, new string[]{"BTU"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Calorie, new CultureInfo("en-US"), false, true, new string[]{"cal"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.DecathermEc, new CultureInfo("en-US"), false, true, new string[]{"Dth (E.C.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.DecathermEc, new CultureInfo("ru-RU"), false, true, new string[]{"Европейский декатерм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.DecathermImperial, new CultureInfo("en-US"), false, true, new string[]{"Dth (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.DecathermImperial, new CultureInfo("ru-RU"), false, true, new string[]{"Английский декатерм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.DecathermUs, new CultureInfo("en-US"), false, true, new string[]{"Dth (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.DecathermUs, new CultureInfo("ru-RU"), false, true, new string[]{"Американский декатерм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ElectronVolt, new CultureInfo("en-US"), false, true, new string[]{"eV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ElectronVolt, new CultureInfo("ru-RU"), false, true, new string[]{"эВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Erg, new CultureInfo("en-US"), false, true, new string[]{"erg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.FootPound, new CultureInfo("en-US"), false, true, new string[]{"ft·lb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.GigabritishThermalUnit, new CultureInfo("en-US"), false, true, new string[]{"GBTU"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.GigaelectronVolt, new CultureInfo("en-US"), false, true, new string[]{"GeV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.GigaelectronVolt, new CultureInfo("ru-RU"), false, true, new string[]{"ГэВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Gigajoule, new CultureInfo("en-US"), false, true, new string[]{"GJ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.GigawattDay, new CultureInfo("en-US"), false, true, new string[]{"GWd"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.GigawattDay, new CultureInfo("ru-RU"), false, true, new string[]{"ГВт/д"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.GigawattHour, new CultureInfo("en-US"), false, true, new string[]{"GWh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.GigawattHour, new CultureInfo("ru-RU"), false, true, new string[]{"ГВт/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.HorsepowerHour, new CultureInfo("en-US"), false, true, new string[]{"hp·h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Joule, new CultureInfo("en-US"), false, true, new string[]{"J"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.KilobritishThermalUnit, new CultureInfo("en-US"), false, true, new string[]{"kBTU"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Kilocalorie, new CultureInfo("en-US"), false, true, new string[]{"kcal"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.KiloelectronVolt, new CultureInfo("en-US"), false, true, new string[]{"keV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.KiloelectronVolt, new CultureInfo("ru-RU"), false, true, new string[]{"кэВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Kilojoule, new CultureInfo("en-US"), false, true, new string[]{"kJ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.KilowattDay, new CultureInfo("en-US"), false, true, new string[]{"kWd"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.KilowattDay, new CultureInfo("ru-RU"), false, true, new string[]{"кВт/д"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.KilowattHour, new CultureInfo("en-US"), false, true, new string[]{"kWh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.KilowattHour, new CultureInfo("ru-RU"), false, true, new string[]{"кВт/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.MegabritishThermalUnit, new CultureInfo("en-US"), false, true, new string[]{"MBTU"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Megacalorie, new CultureInfo("en-US"), false, true, new string[]{"Mcal"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.MegaelectronVolt, new CultureInfo("en-US"), false, true, new string[]{"MeV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.MegaelectronVolt, new CultureInfo("ru-RU"), false, true, new string[]{"МэВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Megajoule, new CultureInfo("en-US"), false, true, new string[]{"MJ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.MegawattDay, new CultureInfo("en-US"), false, true, new string[]{"MWd"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.MegawattDay, new CultureInfo("ru-RU"), false, true, new string[]{"МВт/д"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.MegawattHour, new CultureInfo("en-US"), false, true, new string[]{"MWh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.MegawattHour, new CultureInfo("ru-RU"), false, true, new string[]{"МВт/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Millijoule, new CultureInfo("en-US"), false, true, new string[]{"mJ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Petajoule, new CultureInfo("en-US"), false, true, new string[]{"PJ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.TeraelectronVolt, new CultureInfo("en-US"), false, true, new string[]{"TeV"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.TeraelectronVolt, new CultureInfo("ru-RU"), false, true, new string[]{"ТэВ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.Terajoule, new CultureInfo("en-US"), false, true, new string[]{"TJ"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.TerawattDay, new CultureInfo("en-US"), false, true, new string[]{"TWd"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.TerawattDay, new CultureInfo("ru-RU"), false, true, new string[]{"ТВт/д"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.TerawattHour, new CultureInfo("en-US"), false, true, new string[]{"TWh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.TerawattHour, new CultureInfo("ru-RU"), false, true, new string[]{"ТВт/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ThermEc, new CultureInfo("en-US"), false, true, new string[]{"th (E.C.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ThermEc, new CultureInfo("ru-RU"), false, true, new string[]{"Европейский терм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ThermImperial, new CultureInfo("en-US"), false, true, new string[]{"th (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ThermImperial, new CultureInfo("ru-RU"), false, true, new string[]{"Английский терм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ThermUs, new CultureInfo("en-US"), false, true, new string[]{"th (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.ThermUs, new CultureInfo("ru-RU"), false, true, new string[]{"Американский терм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.WattDay, new CultureInfo("en-US"), false, true, new string[]{"Wd"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.WattDay, new CultureInfo("ru-RU"), false, true, new string[]{"Вт/д"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.WattHour, new CultureInfo("en-US"), false, true, new string[]{"Wh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyUnit.WattHour, new CultureInfo("ru-RU"), false, true, new string[]{"Вт/ч"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs index ddfd162708..69d3728d37 100644 --- a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs @@ -65,18 +65,18 @@ static EnergyDensity() Info = new QuantityInfo("EnergyDensity", new UnitInfo[] { - new UnitInfo(EnergyDensityUnit.GigajoulePerCubicMeter, "GigajoulesPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.GigawattHourPerCubicMeter, "GigawattHoursPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.JoulePerCubicMeter, "JoulesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second)), - new UnitInfo(EnergyDensityUnit.KilojoulePerCubicMeter, "KilojoulesPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.KilowattHourPerCubicMeter, "KilowattHoursPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.MegajoulePerCubicMeter, "MegajoulesPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.MegawattHourPerCubicMeter, "MegawattHoursPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.PetajoulePerCubicMeter, "PetajoulesPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.PetawattHourPerCubicMeter, "PetawattHoursPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.TerajoulePerCubicMeter, "TerajoulesPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.TerawattHourPerCubicMeter, "TerawattHoursPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(EnergyDensityUnit.WattHourPerCubicMeter, "WattHoursPerCubicMeter", BaseUnits.Undefined), + new UnitInfo(EnergyDensityUnit.GigajoulePerCubicMeter, "GigajoulesPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.GigawattHourPerCubicMeter, "GigawattHoursPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.JoulePerCubicMeter, "JoulesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second), "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.KilojoulePerCubicMeter, "KilojoulesPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.KilowattHourPerCubicMeter, "KilowattHoursPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.MegajoulePerCubicMeter, "MegajoulesPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.MegawattHourPerCubicMeter, "MegawattHoursPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.PetajoulePerCubicMeter, "PetajoulesPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.PetawattHourPerCubicMeter, "PetawattHoursPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.TerajoulePerCubicMeter, "TerajoulesPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.TerawattHourPerCubicMeter, "TerawattHoursPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), + new UnitInfo(EnergyDensityUnit.WattHourPerCubicMeter, "WattHoursPerCubicMeter", BaseUnits.Undefined, "EnergyDensity"), }, BaseUnit, Zero, BaseDimensions); @@ -280,22 +280,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(EnergyDensityUnit.JoulePerCubicMeter, EnergyDensityUnit.WattHourPerCubicMeter, quantity => quantity.ToUnit(EnergyDensityUnit.WattHourPerCubicMeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.GigajoulePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"GJ/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.GigawattHourPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"GWh/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.JoulePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"J/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.KilojoulePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kJ/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.KilowattHourPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kWh/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.MegajoulePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"MJ/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.MegawattHourPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"MWh/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.PetajoulePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"PJ/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.PetawattHourPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"PWh/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.TerajoulePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"TJ/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.TerawattHourPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"TWh/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EnergyDensityUnit.WattHourPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"Wh/m³"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs index 5244cc9452..a0341671eb 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs @@ -65,13 +65,13 @@ static Entropy() Info = new QuantityInfo("Entropy", new UnitInfo[] { - new UnitInfo(EntropyUnit.CaloriePerKelvin, "CaloriesPerKelvin", BaseUnits.Undefined), - new UnitInfo(EntropyUnit.JoulePerDegreeCelsius, "JoulesPerDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(EntropyUnit.JoulePerKelvin, "JoulesPerKelvin", BaseUnits.Undefined), - new UnitInfo(EntropyUnit.KilocaloriePerKelvin, "KilocaloriesPerKelvin", BaseUnits.Undefined), - new UnitInfo(EntropyUnit.KilojoulePerDegreeCelsius, "KilojoulesPerDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(EntropyUnit.KilojoulePerKelvin, "KilojoulesPerKelvin", BaseUnits.Undefined), - new UnitInfo(EntropyUnit.MegajoulePerKelvin, "MegajoulesPerKelvin", BaseUnits.Undefined), + new UnitInfo(EntropyUnit.CaloriePerKelvin, "CaloriesPerKelvin", BaseUnits.Undefined, "Entropy"), + new UnitInfo(EntropyUnit.JoulePerDegreeCelsius, "JoulesPerDegreeCelsius", BaseUnits.Undefined, "Entropy"), + new UnitInfo(EntropyUnit.JoulePerKelvin, "JoulesPerKelvin", BaseUnits.Undefined, "Entropy"), + new UnitInfo(EntropyUnit.KilocaloriePerKelvin, "KilocaloriesPerKelvin", BaseUnits.Undefined, "Entropy"), + new UnitInfo(EntropyUnit.KilojoulePerDegreeCelsius, "KilojoulesPerDegreeCelsius", BaseUnits.Undefined, "Entropy"), + new UnitInfo(EntropyUnit.KilojoulePerKelvin, "KilojoulesPerKelvin", BaseUnits.Undefined, "Entropy"), + new UnitInfo(EntropyUnit.MegajoulePerKelvin, "MegajoulesPerKelvin", BaseUnits.Undefined, "Entropy"), }, BaseUnit, Zero, BaseDimensions); @@ -240,17 +240,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(EntropyUnit.JoulePerKelvin, EntropyUnit.MegajoulePerKelvin, quantity => quantity.ToUnit(EntropyUnit.MegajoulePerKelvin)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(EntropyUnit.CaloriePerKelvin, new CultureInfo("en-US"), false, true, new string[]{"cal/K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EntropyUnit.JoulePerDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"J/C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EntropyUnit.JoulePerKelvin, new CultureInfo("en-US"), false, true, new string[]{"J/K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EntropyUnit.KilocaloriePerKelvin, new CultureInfo("en-US"), false, true, new string[]{"kcal/K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EntropyUnit.KilojoulePerDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"kJ/C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EntropyUnit.KilojoulePerKelvin, new CultureInfo("en-US"), false, true, new string[]{"kJ/K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(EntropyUnit.MegajoulePerKelvin, new CultureInfo("en-US"), false, true, new string[]{"MJ/K"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Force.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.g.cs index ec80001397..d351d7ffca 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.g.cs @@ -65,21 +65,21 @@ static Force() Info = new QuantityInfo("Force", new UnitInfo[] { - new UnitInfo(ForceUnit.Decanewton, "Decanewtons", BaseUnits.Undefined), - new UnitInfo(ForceUnit.Dyn, "Dyne", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram, time: DurationUnit.Second)), - new UnitInfo(ForceUnit.KilogramForce, "KilogramsForce", BaseUnits.Undefined), - new UnitInfo(ForceUnit.Kilonewton, "Kilonewtons", BaseUnits.Undefined), - new UnitInfo(ForceUnit.KiloPond, "KiloPonds", BaseUnits.Undefined), - new UnitInfo(ForceUnit.KilopoundForce, "KilopoundsForce", BaseUnits.Undefined), - new UnitInfo(ForceUnit.Meganewton, "Meganewtons", BaseUnits.Undefined), - new UnitInfo(ForceUnit.Micronewton, "Micronewtons", BaseUnits.Undefined), - new UnitInfo(ForceUnit.Millinewton, "Millinewtons", BaseUnits.Undefined), - new UnitInfo(ForceUnit.Newton, "Newtons", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second)), - new UnitInfo(ForceUnit.OunceForce, "OunceForce", BaseUnits.Undefined), - new UnitInfo(ForceUnit.Poundal, "Poundals", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Pound, time: DurationUnit.Second)), - new UnitInfo(ForceUnit.PoundForce, "PoundsForce", BaseUnits.Undefined), - new UnitInfo(ForceUnit.ShortTonForce, "ShortTonsForce", BaseUnits.Undefined), - new UnitInfo(ForceUnit.TonneForce, "TonnesForce", BaseUnits.Undefined), + new UnitInfo(ForceUnit.Decanewton, "Decanewtons", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.Dyn, "Dyne", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram, time: DurationUnit.Second), "Force"), + new UnitInfo(ForceUnit.KilogramForce, "KilogramsForce", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.Kilonewton, "Kilonewtons", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.KiloPond, "KiloPonds", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.KilopoundForce, "KilopoundsForce", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.Meganewton, "Meganewtons", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.Micronewton, "Micronewtons", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.Millinewton, "Millinewtons", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.Newton, "Newtons", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second), "Force"), + new UnitInfo(ForceUnit.OunceForce, "OunceForce", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.Poundal, "Poundals", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Pound, time: DurationUnit.Second), "Force"), + new UnitInfo(ForceUnit.PoundForce, "PoundsForce", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.ShortTonForce, "ShortTonsForce", BaseUnits.Undefined, "Force"), + new UnitInfo(ForceUnit.TonneForce, "TonnesForce", BaseUnits.Undefined, "Force"), }, BaseUnit, Zero, BaseDimensions); @@ -304,38 +304,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ForceUnit.Newton, ForceUnit.TonneForce, quantity => quantity.ToUnit(ForceUnit.TonneForce)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Decanewton, new CultureInfo("en-US"), false, true, new string[]{"daN"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Decanewton, new CultureInfo("ru-RU"), false, true, new string[]{"даН"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Dyn, new CultureInfo("en-US"), false, true, new string[]{"dyn"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Dyn, new CultureInfo("ru-RU"), false, true, new string[]{"дин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.KilogramForce, new CultureInfo("en-US"), false, true, new string[]{"kgf"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.KilogramForce, new CultureInfo("ru-RU"), false, true, new string[]{"кгс"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Kilonewton, new CultureInfo("en-US"), false, true, new string[]{"kN"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Kilonewton, new CultureInfo("ru-RU"), false, true, new string[]{"кН"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.KiloPond, new CultureInfo("en-US"), false, true, new string[]{"kp"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.KiloPond, new CultureInfo("ru-RU"), false, true, new string[]{"кгс"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.KilopoundForce, new CultureInfo("en-US"), false, true, new string[]{"kipf", "kip", "k"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.KilopoundForce, new CultureInfo("ru-RU"), false, true, new string[]{"кипф", "койка", "К"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Meganewton, new CultureInfo("en-US"), false, true, new string[]{"MN"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Meganewton, new CultureInfo("ru-RU"), false, true, new string[]{"МН"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Micronewton, new CultureInfo("en-US"), false, true, new string[]{"µN"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Micronewton, new CultureInfo("ru-RU"), false, true, new string[]{"мкН"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Millinewton, new CultureInfo("en-US"), false, true, new string[]{"mN"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Millinewton, new CultureInfo("ru-RU"), false, true, new string[]{"мН"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Newton, new CultureInfo("en-US"), false, true, new string[]{"N"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Newton, new CultureInfo("ru-RU"), false, true, new string[]{"Н"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.OunceForce, new CultureInfo("en-US"), false, true, new string[]{"ozf"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Poundal, new CultureInfo("en-US"), false, true, new string[]{"pdl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.Poundal, new CultureInfo("ru-RU"), false, true, new string[]{"паундаль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.PoundForce, new CultureInfo("en-US"), false, true, new string[]{"lbf"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.PoundForce, new CultureInfo("ru-RU"), false, true, new string[]{"фунт-сила"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.ShortTonForce, new CultureInfo("en-US"), false, true, new string[]{"tf (short)", "t (US)f", "short tons-force"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.TonneForce, new CultureInfo("en-US"), false, true, new string[]{"tf", "Ton"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceUnit.TonneForce, new CultureInfo("ru-RU"), false, true, new string[]{"тс"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs index 1b3e5b7b74..043a450662 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs @@ -65,21 +65,21 @@ static ForceChangeRate() Info = new QuantityInfo("ForceChangeRate", new UnitInfo[] { - new UnitInfo(ForceChangeRateUnit.CentinewtonPerSecond, "CentinewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.DecanewtonPerMinute, "DecanewtonsPerMinute", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.DecanewtonPerSecond, "DecanewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.DecinewtonPerSecond, "DecinewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.KilonewtonPerMinute, "KilonewtonsPerMinute", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.KilonewtonPerSecond, "KilonewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.KilopoundForcePerMinute, "KilopoundsForcePerMinute", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.KilopoundForcePerSecond, "KilopoundsForcePerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.MicronewtonPerSecond, "MicronewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.MillinewtonPerSecond, "MillinewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.NanonewtonPerSecond, "NanonewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.NewtonPerMinute, "NewtonsPerMinute", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.NewtonPerSecond, "NewtonsPerSecond", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.PoundForcePerMinute, "PoundsForcePerMinute", BaseUnits.Undefined), - new UnitInfo(ForceChangeRateUnit.PoundForcePerSecond, "PoundsForcePerSecond", BaseUnits.Undefined), + new UnitInfo(ForceChangeRateUnit.CentinewtonPerSecond, "CentinewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.DecanewtonPerMinute, "DecanewtonsPerMinute", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.DecanewtonPerSecond, "DecanewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.DecinewtonPerSecond, "DecinewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.KilonewtonPerMinute, "KilonewtonsPerMinute", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.KilonewtonPerSecond, "KilonewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.KilopoundForcePerMinute, "KilopoundsForcePerMinute", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.KilopoundForcePerSecond, "KilopoundsForcePerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.MicronewtonPerSecond, "MicronewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.MillinewtonPerSecond, "MillinewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.NanonewtonPerSecond, "NanonewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.NewtonPerMinute, "NewtonsPerMinute", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.NewtonPerSecond, "NewtonsPerSecond", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.PoundForcePerMinute, "PoundsForcePerMinute", BaseUnits.Undefined, "ForceChangeRate"), + new UnitInfo(ForceChangeRateUnit.PoundForcePerSecond, "PoundsForcePerSecond", BaseUnits.Undefined, "ForceChangeRate"), }, BaseUnit, Zero, BaseDimensions); @@ -304,25 +304,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ForceChangeRateUnit.NewtonPerSecond, ForceChangeRateUnit.PoundForcePerSecond, quantity => quantity.ToUnit(ForceChangeRateUnit.PoundForcePerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.CentinewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"cN/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.DecanewtonPerMinute, new CultureInfo("en-US"), false, true, new string[]{"daN/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.DecanewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"daN/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.DecinewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"dN/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.KilonewtonPerMinute, new CultureInfo("en-US"), false, true, new string[]{"kN/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.KilonewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kN/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.KilopoundForcePerMinute, new CultureInfo("en-US"), false, true, new string[]{"kipf/min", "kip/min", "k/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.KilopoundForcePerSecond, new CultureInfo("en-US"), false, true, new string[]{"kipf/s", "kip/s", "k/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.MicronewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"µN/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.MillinewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mN/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.NanonewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"nN/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.NewtonPerMinute, new CultureInfo("en-US"), false, true, new string[]{"N/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.NewtonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"N/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.PoundForcePerMinute, new CultureInfo("en-US"), false, true, new string[]{"lbf/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForceChangeRateUnit.PoundForcePerSecond, new CultureInfo("en-US"), false, true, new string[]{"lbf/s"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs index 37dcc95e9e..e52cf9f038 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs @@ -65,44 +65,44 @@ static ForcePerLength() Info = new QuantityInfo("ForcePerLength", new UnitInfo[] { - new UnitInfo(ForcePerLengthUnit.CentinewtonPerCentimeter, "CentinewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.CentinewtonPerMeter, "CentinewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.CentinewtonPerMillimeter, "CentinewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.DecanewtonPerCentimeter, "DecanewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.DecanewtonPerMeter, "DecanewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.DecanewtonPerMillimeter, "DecanewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.DecinewtonPerCentimeter, "DecinewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.DecinewtonPerMeter, "DecinewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.DecinewtonPerMillimeter, "DecinewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilogramForcePerCentimeter, "KilogramsForcePerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilogramForcePerMeter, "KilogramsForcePerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilogramForcePerMillimeter, "KilogramsForcePerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilonewtonPerCentimeter, "KilonewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilonewtonPerMeter, "KilonewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilonewtonPerMillimeter, "KilonewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilopoundForcePerFoot, "KilopoundsForcePerFoot", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.KilopoundForcePerInch, "KilopoundsForcePerInch", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MeganewtonPerCentimeter, "MeganewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MeganewtonPerMeter, "MeganewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MeganewtonPerMillimeter, "MeganewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MicronewtonPerCentimeter, "MicronewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MicronewtonPerMeter, "MicronewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MicronewtonPerMillimeter, "MicronewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MillinewtonPerCentimeter, "MillinewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MillinewtonPerMeter, "MillinewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.MillinewtonPerMillimeter, "MillinewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.NanonewtonPerCentimeter, "NanonewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.NanonewtonPerMeter, "NanonewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.NanonewtonPerMillimeter, "NanonewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.NewtonPerCentimeter, "NewtonsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.NewtonPerMeter, "NewtonsPerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.NewtonPerMillimeter, "NewtonsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.PoundForcePerFoot, "PoundsForcePerFoot", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.PoundForcePerInch, "PoundsForcePerInch", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.PoundForcePerYard, "PoundsForcePerYard", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.TonneForcePerCentimeter, "TonnesForcePerCentimeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.TonneForcePerMeter, "TonnesForcePerMeter", BaseUnits.Undefined), - new UnitInfo(ForcePerLengthUnit.TonneForcePerMillimeter, "TonnesForcePerMillimeter", BaseUnits.Undefined), + new UnitInfo(ForcePerLengthUnit.CentinewtonPerCentimeter, "CentinewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.CentinewtonPerMeter, "CentinewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.CentinewtonPerMillimeter, "CentinewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.DecanewtonPerCentimeter, "DecanewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.DecanewtonPerMeter, "DecanewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.DecanewtonPerMillimeter, "DecanewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.DecinewtonPerCentimeter, "DecinewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.DecinewtonPerMeter, "DecinewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.DecinewtonPerMillimeter, "DecinewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilogramForcePerCentimeter, "KilogramsForcePerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilogramForcePerMeter, "KilogramsForcePerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilogramForcePerMillimeter, "KilogramsForcePerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilonewtonPerCentimeter, "KilonewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilonewtonPerMeter, "KilonewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilonewtonPerMillimeter, "KilonewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilopoundForcePerFoot, "KilopoundsForcePerFoot", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.KilopoundForcePerInch, "KilopoundsForcePerInch", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MeganewtonPerCentimeter, "MeganewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MeganewtonPerMeter, "MeganewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MeganewtonPerMillimeter, "MeganewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MicronewtonPerCentimeter, "MicronewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MicronewtonPerMeter, "MicronewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MicronewtonPerMillimeter, "MicronewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MillinewtonPerCentimeter, "MillinewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MillinewtonPerMeter, "MillinewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.MillinewtonPerMillimeter, "MillinewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.NanonewtonPerCentimeter, "NanonewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.NanonewtonPerMeter, "NanonewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.NanonewtonPerMillimeter, "NanonewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.NewtonPerCentimeter, "NewtonsPerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.NewtonPerMeter, "NewtonsPerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.NewtonPerMillimeter, "NewtonsPerMillimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.PoundForcePerFoot, "PoundsForcePerFoot", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.PoundForcePerInch, "PoundsForcePerInch", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.PoundForcePerYard, "PoundsForcePerYard", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.TonneForcePerCentimeter, "TonnesForcePerCentimeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.TonneForcePerMeter, "TonnesForcePerMeter", BaseUnits.Undefined, "ForcePerLength"), + new UnitInfo(ForcePerLengthUnit.TonneForcePerMillimeter, "TonnesForcePerMillimeter", BaseUnits.Undefined, "ForcePerLength"), }, BaseUnit, Zero, BaseDimensions); @@ -488,54 +488,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ForcePerLengthUnit.NewtonPerMeter, ForcePerLengthUnit.TonneForcePerMillimeter, quantity => quantity.ToUnit(ForcePerLengthUnit.TonneForcePerMillimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.CentinewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"cN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.CentinewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"cN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.CentinewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"cN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.DecanewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"daN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.DecanewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"daN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.DecanewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"daN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.DecinewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"dN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.DecinewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"dN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.DecinewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"dN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilogramForcePerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilogramForcePerCentimeter, new CultureInfo("ru-RU"), false, true, new string[]{"кгс/см"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilogramForcePerMeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilogramForcePerMeter, new CultureInfo("ru-RU"), false, true, new string[]{"кгс/м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilogramForcePerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilogramForcePerMillimeter, new CultureInfo("ru-RU"), false, true, new string[]{"кгс/мм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilonewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilonewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilonewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilopoundForcePerFoot, new CultureInfo("en-US"), false, true, new string[]{"kipf/ft", "kip/ft", "k/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.KilopoundForcePerInch, new CultureInfo("en-US"), false, true, new string[]{"kipf/in", "kip/in", "k/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MeganewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"MN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MeganewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"MN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MeganewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"MN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MicronewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"µN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MicronewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"µN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MicronewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"µN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MillinewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MillinewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"mN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.MillinewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.NanonewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"nN/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.NanonewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"nN/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.NanonewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"nN/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.NewtonPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"N/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.NewtonPerMeter, new CultureInfo("en-US"), false, true, new string[]{"N/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.NewtonPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"N/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.PoundForcePerFoot, new CultureInfo("en-US"), false, true, new string[]{"lbf/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.PoundForcePerInch, new CultureInfo("en-US"), false, true, new string[]{"lbf/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.PoundForcePerYard, new CultureInfo("en-US"), false, true, new string[]{"lbf/yd"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.TonneForcePerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"tf/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.TonneForcePerCentimeter, new CultureInfo("ru-RU"), false, true, new string[]{"тс/см"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.TonneForcePerMeter, new CultureInfo("en-US"), false, true, new string[]{"tf/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.TonneForcePerMeter, new CultureInfo("ru-RU"), false, true, new string[]{"тс/м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.TonneForcePerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"tf/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ForcePerLengthUnit.TonneForcePerMillimeter, new CultureInfo("ru-RU"), false, true, new string[]{"тс/мм"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs index f79728e42c..81fae7ba29 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs @@ -65,19 +65,19 @@ static Frequency() Info = new QuantityInfo("Frequency", new UnitInfo[] { - new UnitInfo(FrequencyUnit.BeatPerMinute, "BeatsPerMinute", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.BUnit, "BUnits", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.CyclePerHour, "CyclesPerHour", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.CyclePerMinute, "CyclesPerMinute", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.Gigahertz, "Gigahertz", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.Hertz, "Hertz", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.Kilohertz, "Kilohertz", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.Megahertz, "Megahertz", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.Microhertz, "Microhertz", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.Millihertz, "Millihertz", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.PerSecond, "PerSecond", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.RadianPerSecond, "RadiansPerSecond", BaseUnits.Undefined), - new UnitInfo(FrequencyUnit.Terahertz, "Terahertz", BaseUnits.Undefined), + new UnitInfo(FrequencyUnit.BeatPerMinute, "BeatsPerMinute", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.BUnit, "BUnits", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.CyclePerHour, "CyclesPerHour", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.CyclePerMinute, "CyclesPerMinute", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.Gigahertz, "Gigahertz", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.Hertz, "Hertz", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.Kilohertz, "Kilohertz", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.Megahertz, "Megahertz", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.Microhertz, "Microhertz", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.Millihertz, "Millihertz", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.PerSecond, "PerSecond", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.RadianPerSecond, "RadiansPerSecond", BaseUnits.Undefined, "Frequency"), + new UnitInfo(FrequencyUnit.Terahertz, "Terahertz", BaseUnits.Undefined, "Frequency"), }, BaseUnit, Zero, BaseDimensions); @@ -288,32 +288,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(FrequencyUnit.Hertz, FrequencyUnit.Terahertz, quantity => quantity.ToUnit(FrequencyUnit.Terahertz)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.BeatPerMinute, new CultureInfo("en-US"), false, true, new string[]{"bpm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.BUnit, new CultureInfo("en-US"), false, true, new string[]{"B Units"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.CyclePerHour, new CultureInfo("en-US"), false, true, new string[]{"cph"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.CyclePerMinute, new CultureInfo("en-US"), false, true, new string[]{"cpm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Gigahertz, new CultureInfo("en-US"), false, true, new string[]{"GHz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Gigahertz, new CultureInfo("ru-RU"), false, true, new string[]{"ГГц"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Hertz, new CultureInfo("en-US"), false, true, new string[]{"Hz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Hertz, new CultureInfo("ru-RU"), false, true, new string[]{"Гц"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Kilohertz, new CultureInfo("en-US"), false, true, new string[]{"kHz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Kilohertz, new CultureInfo("ru-RU"), false, true, new string[]{"кГц"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Megahertz, new CultureInfo("en-US"), false, true, new string[]{"MHz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Megahertz, new CultureInfo("ru-RU"), false, true, new string[]{"МГц"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Microhertz, new CultureInfo("en-US"), false, true, new string[]{"µHz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Microhertz, new CultureInfo("ru-RU"), false, true, new string[]{"мкГц"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Millihertz, new CultureInfo("en-US"), false, true, new string[]{"mHz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Millihertz, new CultureInfo("ru-RU"), false, true, new string[]{"мГц"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.PerSecond, new CultureInfo("en-US"), false, true, new string[]{"s⁻¹"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.PerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"с⁻¹"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.RadianPerSecond, new CultureInfo("en-US"), false, true, new string[]{"rad/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.RadianPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"рад/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Terahertz, new CultureInfo("en-US"), false, true, new string[]{"THz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FrequencyUnit.Terahertz, new CultureInfo("ru-RU"), false, true, new string[]{"ТГц"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs index 130b3bd329..201752b0a4 100644 --- a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs @@ -68,10 +68,10 @@ static FuelEfficiency() Info = new QuantityInfo("FuelEfficiency", new UnitInfo[] { - new UnitInfo(FuelEfficiencyUnit.KilometerPerLiter, "KilometersPerLiters", BaseUnits.Undefined), - new UnitInfo(FuelEfficiencyUnit.LiterPer100Kilometers, "LitersPer100Kilometers", BaseUnits.Undefined), - new UnitInfo(FuelEfficiencyUnit.MilePerUkGallon, "MilesPerUkGallon", BaseUnits.Undefined), - new UnitInfo(FuelEfficiencyUnit.MilePerUsGallon, "MilesPerUsGallon", BaseUnits.Undefined), + new UnitInfo(FuelEfficiencyUnit.KilometerPerLiter, "KilometersPerLiters", BaseUnits.Undefined, "FuelEfficiency"), + new UnitInfo(FuelEfficiencyUnit.LiterPer100Kilometers, "LitersPer100Kilometers", BaseUnits.Undefined, "FuelEfficiency"), + new UnitInfo(FuelEfficiencyUnit.MilePerUkGallon, "MilesPerUkGallon", BaseUnits.Undefined, "FuelEfficiency"), + new UnitInfo(FuelEfficiencyUnit.MilePerUsGallon, "MilesPerUsGallon", BaseUnits.Undefined, "FuelEfficiency"), }, BaseUnit, Zero, BaseDimensions); @@ -219,14 +219,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(FuelEfficiencyUnit.LiterPer100Kilometers, FuelEfficiencyUnit.MilePerUsGallon, quantity => quantity.ToUnit(FuelEfficiencyUnit.MilePerUsGallon)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(FuelEfficiencyUnit.KilometerPerLiter, new CultureInfo("en-US"), false, true, new string[]{"km/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FuelEfficiencyUnit.LiterPer100Kilometers, new CultureInfo("en-US"), false, true, new string[]{"L/100km"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FuelEfficiencyUnit.MilePerUkGallon, new CultureInfo("en-US"), false, true, new string[]{"mpg (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(FuelEfficiencyUnit.MilePerUsGallon, new CultureInfo("en-US"), false, true, new string[]{"mpg (U.S.)"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs index 2398e95f5c..7b55081837 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs @@ -65,24 +65,24 @@ static HeatFlux() Info = new QuantityInfo("HeatFlux", new UnitInfo[] { - new UnitInfo(HeatFluxUnit.BtuPerHourSquareFoot, "BtusPerHourSquareFoot", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.BtuPerMinuteSquareFoot, "BtusPerMinuteSquareFoot", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.BtuPerSecondSquareFoot, "BtusPerSecondSquareFoot", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.BtuPerSecondSquareInch, "BtusPerSecondSquareInch", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.CaloriePerSecondSquareCentimeter, "CaloriesPerSecondSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.CentiwattPerSquareMeter, "CentiwattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.DeciwattPerSquareMeter, "DeciwattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.KilocaloriePerHourSquareMeter, "KilocaloriesPerHourSquareMeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.KilocaloriePerSecondSquareCentimeter, "KilocaloriesPerSecondSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.KilowattPerSquareMeter, "KilowattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.MicrowattPerSquareMeter, "MicrowattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.MilliwattPerSquareMeter, "MilliwattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.NanowattPerSquareMeter, "NanowattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.PoundForcePerFootSecond, "PoundsForcePerFootSecond", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.PoundPerSecondCubed, "PoundsPerSecondCubed", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.WattPerSquareFoot, "WattsPerSquareFoot", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.WattPerSquareInch, "WattsPerSquareInch", BaseUnits.Undefined), - new UnitInfo(HeatFluxUnit.WattPerSquareMeter, "WattsPerSquareMeter", new BaseUnits(mass: MassUnit.Kilogram, time: DurationUnit.Second)), + new UnitInfo(HeatFluxUnit.BtuPerHourSquareFoot, "BtusPerHourSquareFoot", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.BtuPerMinuteSquareFoot, "BtusPerMinuteSquareFoot", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.BtuPerSecondSquareFoot, "BtusPerSecondSquareFoot", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.BtuPerSecondSquareInch, "BtusPerSecondSquareInch", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.CaloriePerSecondSquareCentimeter, "CaloriesPerSecondSquareCentimeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.CentiwattPerSquareMeter, "CentiwattsPerSquareMeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.DeciwattPerSquareMeter, "DeciwattsPerSquareMeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.KilocaloriePerHourSquareMeter, "KilocaloriesPerHourSquareMeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.KilocaloriePerSecondSquareCentimeter, "KilocaloriesPerSecondSquareCentimeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.KilowattPerSquareMeter, "KilowattsPerSquareMeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.MicrowattPerSquareMeter, "MicrowattsPerSquareMeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.MilliwattPerSquareMeter, "MilliwattsPerSquareMeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.NanowattPerSquareMeter, "NanowattsPerSquareMeter", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.PoundForcePerFootSecond, "PoundsForcePerFootSecond", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.PoundPerSecondCubed, "PoundsPerSecondCubed", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.WattPerSquareFoot, "WattsPerSquareFoot", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.WattPerSquareInch, "WattsPerSquareInch", BaseUnits.Undefined, "HeatFlux"), + new UnitInfo(HeatFluxUnit.WattPerSquareMeter, "WattsPerSquareMeter", new BaseUnits(mass: MassUnit.Kilogram, time: DurationUnit.Second), "HeatFlux"), }, BaseUnit, Zero, BaseDimensions); @@ -328,28 +328,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(HeatFluxUnit.WattPerSquareMeter, HeatFluxUnit.WattPerSquareInch, quantity => quantity.ToUnit(HeatFluxUnit.WattPerSquareInch)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.BtuPerHourSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"BTU/h·ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.BtuPerMinuteSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"BTU/min·ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.BtuPerSecondSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"BTU/s·ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.BtuPerSecondSquareInch, new CultureInfo("en-US"), false, true, new string[]{"BTU/s·in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.CaloriePerSecondSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"cal/s·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.CentiwattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"cW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.DeciwattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"dW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.KilocaloriePerHourSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kcal/h·m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.KilocaloriePerSecondSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kcal/s·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.KilowattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.MicrowattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"µW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.MilliwattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"mW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.NanowattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"nW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.PoundForcePerFootSecond, new CultureInfo("en-US"), false, true, new string[]{"lbf/(ft·s)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.PoundPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"lb/s³", "lbm/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.WattPerSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"W/ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.WattPerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"W/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatFluxUnit.WattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"W/m²"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs index 1f9df7a7cf..3c8b9665c7 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs @@ -65,12 +65,12 @@ static HeatTransferCoefficient() Info = new QuantityInfo("HeatTransferCoefficient", new UnitInfo[] { - new UnitInfo(HeatTransferCoefficientUnit.BtuPerHourSquareFootDegreeFahrenheit, "BtusPerHourSquareFootDegreeFahrenheit", BaseUnits.Undefined), - new UnitInfo(HeatTransferCoefficientUnit.BtuPerSquareFootDegreeFahrenheit, "BtusPerSquareFootDegreeFahrenheit", BaseUnits.Undefined), - new UnitInfo(HeatTransferCoefficientUnit.CaloriePerHourSquareMeterDegreeCelsius, "CaloriesPerHourSquareMeterDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(HeatTransferCoefficientUnit.KilocaloriePerHourSquareMeterDegreeCelsius, "KilocaloriesPerHourSquareMeterDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(HeatTransferCoefficientUnit.WattPerSquareMeterCelsius, "WattsPerSquareMeterCelsius", BaseUnits.Undefined), - new UnitInfo(HeatTransferCoefficientUnit.WattPerSquareMeterKelvin, "WattsPerSquareMeterKelvin", BaseUnits.Undefined), + new UnitInfo(HeatTransferCoefficientUnit.BtuPerHourSquareFootDegreeFahrenheit, "BtusPerHourSquareFootDegreeFahrenheit", BaseUnits.Undefined, "HeatTransferCoefficient"), + new UnitInfo(HeatTransferCoefficientUnit.BtuPerSquareFootDegreeFahrenheit, "BtusPerSquareFootDegreeFahrenheit", BaseUnits.Undefined, "HeatTransferCoefficient"), + new UnitInfo(HeatTransferCoefficientUnit.CaloriePerHourSquareMeterDegreeCelsius, "CaloriesPerHourSquareMeterDegreeCelsius", BaseUnits.Undefined, "HeatTransferCoefficient"), + new UnitInfo(HeatTransferCoefficientUnit.KilocaloriePerHourSquareMeterDegreeCelsius, "KilocaloriesPerHourSquareMeterDegreeCelsius", BaseUnits.Undefined, "HeatTransferCoefficient"), + new UnitInfo(HeatTransferCoefficientUnit.WattPerSquareMeterCelsius, "WattsPerSquareMeterCelsius", BaseUnits.Undefined, "HeatTransferCoefficient"), + new UnitInfo(HeatTransferCoefficientUnit.WattPerSquareMeterKelvin, "WattsPerSquareMeterKelvin", BaseUnits.Undefined, "HeatTransferCoefficient"), }, BaseUnit, Zero, BaseDimensions); @@ -233,16 +233,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(HeatTransferCoefficientUnit.WattPerSquareMeterKelvin, HeatTransferCoefficientUnit.WattPerSquareMeterCelsius, quantity => quantity.ToUnit(HeatTransferCoefficientUnit.WattPerSquareMeterCelsius)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(HeatTransferCoefficientUnit.BtuPerHourSquareFootDegreeFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"Btu/h·ft²·°F", "Btu/ft²·h·°F", "Btu/hr·ft²·°F", "Btu/ft²·hr·°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatTransferCoefficientUnit.BtuPerSquareFootDegreeFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"Btu/ft²·°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatTransferCoefficientUnit.CaloriePerHourSquareMeterDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"kcal/h·m²·°C", "kcal/m²·h·°C", "kcal/hr·m²·°C", "kcal/m²·hr·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatTransferCoefficientUnit.KilocaloriePerHourSquareMeterDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"kkcal/h·m²·°C", "kkcal/m²·h·°C", "kkcal/hr·m²·°C", "kkcal/m²·hr·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatTransferCoefficientUnit.WattPerSquareMeterCelsius, new CultureInfo("en-US"), false, true, new string[]{"W/m²·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(HeatTransferCoefficientUnit.WattPerSquareMeterKelvin, new CultureInfo("en-US"), false, true, new string[]{"W/m²·K"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs index ed7c4316c2..700b19e157 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs @@ -68,10 +68,10 @@ static Illuminance() Info = new QuantityInfo("Illuminance", new UnitInfo[] { - new UnitInfo(IlluminanceUnit.Kilolux, "Kilolux", BaseUnits.Undefined), - new UnitInfo(IlluminanceUnit.Lux, "Lux", BaseUnits.Undefined), - new UnitInfo(IlluminanceUnit.Megalux, "Megalux", BaseUnits.Undefined), - new UnitInfo(IlluminanceUnit.Millilux, "Millilux", BaseUnits.Undefined), + new UnitInfo(IlluminanceUnit.Kilolux, "Kilolux", BaseUnits.Undefined, "Illuminance"), + new UnitInfo(IlluminanceUnit.Lux, "Lux", BaseUnits.Undefined, "Illuminance"), + new UnitInfo(IlluminanceUnit.Megalux, "Megalux", BaseUnits.Undefined, "Illuminance"), + new UnitInfo(IlluminanceUnit.Millilux, "Millilux", BaseUnits.Undefined, "Illuminance"), }, BaseUnit, Zero, BaseDimensions); @@ -219,14 +219,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(IlluminanceUnit.Lux, IlluminanceUnit.Millilux, quantity => quantity.ToUnit(IlluminanceUnit.Millilux)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(IlluminanceUnit.Kilolux, new CultureInfo("en-US"), false, true, new string[]{"klx"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IlluminanceUnit.Lux, new CultureInfo("en-US"), false, true, new string[]{"lx"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IlluminanceUnit.Megalux, new CultureInfo("en-US"), false, true, new string[]{"Mlx"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IlluminanceUnit.Millilux, new CultureInfo("en-US"), false, true, new string[]{"mlx"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs index 3bf1a6d8e7..fcbe9e0d5b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs @@ -65,19 +65,19 @@ static Impulse() Info = new QuantityInfo("Impulse", new UnitInfo[] { - new UnitInfo(ImpulseUnit.CentinewtonSecond, "CentinewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.DecanewtonSecond, "DecanewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.DecinewtonSecond, "DecinewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.KilogramMeterPerSecond, "KilogramMetersPerSecond", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.KilonewtonSecond, "KilonewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.MeganewtonSecond, "MeganewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.MicronewtonSecond, "MicronewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.MillinewtonSecond, "MillinewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.NanonewtonSecond, "NanonewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.NewtonSecond, "NewtonSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.PoundFootPerSecond, "PoundFeetPerSecond", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.PoundForceSecond, "PoundForceSeconds", BaseUnits.Undefined), - new UnitInfo(ImpulseUnit.SlugFootPerSecond, "SlugFeetPerSecond", BaseUnits.Undefined), + new UnitInfo(ImpulseUnit.CentinewtonSecond, "CentinewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.DecanewtonSecond, "DecanewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.DecinewtonSecond, "DecinewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.KilogramMeterPerSecond, "KilogramMetersPerSecond", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.KilonewtonSecond, "KilonewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.MeganewtonSecond, "MeganewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.MicronewtonSecond, "MicronewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.MillinewtonSecond, "MillinewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.NanonewtonSecond, "NanonewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.NewtonSecond, "NewtonSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.PoundFootPerSecond, "PoundFeetPerSecond", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.PoundForceSecond, "PoundForceSeconds", BaseUnits.Undefined, "Impulse"), + new UnitInfo(ImpulseUnit.SlugFootPerSecond, "SlugFeetPerSecond", BaseUnits.Undefined, "Impulse"), }, BaseUnit, Zero, BaseDimensions); @@ -288,23 +288,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ImpulseUnit.NewtonSecond, ImpulseUnit.SlugFootPerSecond, quantity => quantity.ToUnit(ImpulseUnit.SlugFootPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.CentinewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"cN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.DecanewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"daN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.DecinewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"dN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.KilogramMeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kg·m/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.KilonewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"kN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.MeganewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"MN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.MicronewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"µN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.MillinewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"mN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.NanonewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"nN·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.NewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"N·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.PoundFootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"lb·ft/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.PoundForceSecond, new CultureInfo("en-US"), false, true, new string[]{"lbf·s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ImpulseUnit.SlugFootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"slug·ft/s"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Information.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.g.cs index 0640c7dbff..c324d17745 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.g.cs @@ -66,32 +66,32 @@ static Information() Info = new QuantityInfo("Information", new UnitInfo[] { - new UnitInfo(InformationUnit.Bit, "Bits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Byte, "Bytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Exabit, "Exabits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Exabyte, "Exabytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Exbibit, "Exbibits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Exbibyte, "Exbibytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Gibibit, "Gibibits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Gibibyte, "Gibibytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Gigabit, "Gigabits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Gigabyte, "Gigabytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Kibibit, "Kibibits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Kibibyte, "Kibibytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Kilobit, "Kilobits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Kilobyte, "Kilobytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Mebibit, "Mebibits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Mebibyte, "Mebibytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Megabit, "Megabits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Megabyte, "Megabytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Pebibit, "Pebibits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Pebibyte, "Pebibytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Petabit, "Petabits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Petabyte, "Petabytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Tebibit, "Tebibits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Tebibyte, "Tebibytes", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Terabit, "Terabits", BaseUnits.Undefined), - new UnitInfo(InformationUnit.Terabyte, "Terabytes", BaseUnits.Undefined), + new UnitInfo(InformationUnit.Bit, "Bits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Byte, "Bytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Exabit, "Exabits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Exabyte, "Exabytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Exbibit, "Exbibits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Exbibyte, "Exbibytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Gibibit, "Gibibits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Gibibyte, "Gibibytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Gigabit, "Gigabits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Gigabyte, "Gigabytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Kibibit, "Kibibits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Kibibyte, "Kibibytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Kilobit, "Kilobits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Kilobyte, "Kilobytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Mebibit, "Mebibits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Mebibyte, "Mebibytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Megabit, "Megabits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Megabyte, "Megabytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Pebibit, "Pebibits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Pebibyte, "Pebibytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Petabit, "Petabits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Petabyte, "Petabytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Tebibit, "Tebibits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Tebibyte, "Tebibytes", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Terabit, "Terabits", BaseUnits.Undefined, "Information"), + new UnitInfo(InformationUnit.Terabyte, "Terabytes", BaseUnits.Undefined, "Information"), }, BaseUnit, Zero, BaseDimensions); @@ -393,36 +393,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(InformationUnit.Bit, InformationUnit.Terabyte, quantity => quantity.ToUnit(InformationUnit.Terabyte)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Bit, new CultureInfo("en-US"), false, true, new string[]{"b"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Byte, new CultureInfo("en-US"), false, true, new string[]{"B"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Exabit, new CultureInfo("en-US"), false, true, new string[]{"Eb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Exabyte, new CultureInfo("en-US"), false, true, new string[]{"EB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Exbibit, new CultureInfo("en-US"), false, true, new string[]{"Eib"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Exbibyte, new CultureInfo("en-US"), false, true, new string[]{"EiB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Gibibit, new CultureInfo("en-US"), false, true, new string[]{"Gib"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Gibibyte, new CultureInfo("en-US"), false, true, new string[]{"GiB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Gigabit, new CultureInfo("en-US"), false, true, new string[]{"Gb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Gigabyte, new CultureInfo("en-US"), false, true, new string[]{"GB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Kibibit, new CultureInfo("en-US"), false, true, new string[]{"Kib"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Kibibyte, new CultureInfo("en-US"), false, true, new string[]{"KiB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Kilobit, new CultureInfo("en-US"), false, true, new string[]{"kb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Kilobyte, new CultureInfo("en-US"), false, true, new string[]{"kB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Mebibit, new CultureInfo("en-US"), false, true, new string[]{"Mib"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Mebibyte, new CultureInfo("en-US"), false, true, new string[]{"MiB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Megabit, new CultureInfo("en-US"), false, true, new string[]{"Mb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Megabyte, new CultureInfo("en-US"), false, true, new string[]{"MB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Pebibit, new CultureInfo("en-US"), false, true, new string[]{"Pib"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Pebibyte, new CultureInfo("en-US"), false, true, new string[]{"PiB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Petabit, new CultureInfo("en-US"), false, true, new string[]{"Pb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Petabyte, new CultureInfo("en-US"), false, true, new string[]{"PB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Tebibit, new CultureInfo("en-US"), false, true, new string[]{"Tib"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Tebibyte, new CultureInfo("en-US"), false, true, new string[]{"TiB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Terabit, new CultureInfo("en-US"), false, true, new string[]{"Tb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(InformationUnit.Terabyte, new CultureInfo("en-US"), false, true, new string[]{"TB"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs index 96c0516301..12f241ca44 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs @@ -65,20 +65,20 @@ static Irradiance() Info = new QuantityInfo("Irradiance", new UnitInfo[] { - new UnitInfo(IrradianceUnit.KilowattPerSquareCentimeter, "KilowattsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.KilowattPerSquareMeter, "KilowattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.MegawattPerSquareCentimeter, "MegawattsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.MegawattPerSquareMeter, "MegawattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.MicrowattPerSquareCentimeter, "MicrowattsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.MicrowattPerSquareMeter, "MicrowattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.MilliwattPerSquareCentimeter, "MilliwattsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.MilliwattPerSquareMeter, "MilliwattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.NanowattPerSquareCentimeter, "NanowattsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.NanowattPerSquareMeter, "NanowattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.PicowattPerSquareCentimeter, "PicowattsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.PicowattPerSquareMeter, "PicowattsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.WattPerSquareCentimeter, "WattsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradianceUnit.WattPerSquareMeter, "WattsPerSquareMeter", BaseUnits.Undefined), + new UnitInfo(IrradianceUnit.KilowattPerSquareCentimeter, "KilowattsPerSquareCentimeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.KilowattPerSquareMeter, "KilowattsPerSquareMeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.MegawattPerSquareCentimeter, "MegawattsPerSquareCentimeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.MegawattPerSquareMeter, "MegawattsPerSquareMeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.MicrowattPerSquareCentimeter, "MicrowattsPerSquareCentimeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.MicrowattPerSquareMeter, "MicrowattsPerSquareMeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.MilliwattPerSquareCentimeter, "MilliwattsPerSquareCentimeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.MilliwattPerSquareMeter, "MilliwattsPerSquareMeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.NanowattPerSquareCentimeter, "NanowattsPerSquareCentimeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.NanowattPerSquareMeter, "NanowattsPerSquareMeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.PicowattPerSquareCentimeter, "PicowattsPerSquareCentimeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.PicowattPerSquareMeter, "PicowattsPerSquareMeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.WattPerSquareCentimeter, "WattsPerSquareCentimeter", BaseUnits.Undefined, "Irradiance"), + new UnitInfo(IrradianceUnit.WattPerSquareMeter, "WattsPerSquareMeter", BaseUnits.Undefined, "Irradiance"), }, BaseUnit, Zero, BaseDimensions); @@ -296,24 +296,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(IrradianceUnit.WattPerSquareMeter, IrradianceUnit.WattPerSquareCentimeter, quantity => quantity.ToUnit(IrradianceUnit.WattPerSquareCentimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.KilowattPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kW/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.KilowattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.MegawattPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"MW/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.MegawattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"MW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.MicrowattPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"µW/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.MicrowattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"µW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.MilliwattPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mW/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.MilliwattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"mW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.NanowattPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"nW/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.NanowattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"nW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.PicowattPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"pW/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.PicowattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"pW/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.WattPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"W/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradianceUnit.WattPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"W/m²"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs index 58f32c713e..ba4b202659 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs @@ -68,13 +68,13 @@ static Irradiation() Info = new QuantityInfo("Irradiation", new UnitInfo[] { - new UnitInfo(IrradiationUnit.JoulePerSquareCentimeter, "JoulesPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradiationUnit.JoulePerSquareMeter, "JoulesPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradiationUnit.JoulePerSquareMillimeter, "JoulesPerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(IrradiationUnit.KilojoulePerSquareMeter, "KilojoulesPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradiationUnit.KilowattHourPerSquareMeter, "KilowattHoursPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(IrradiationUnit.MillijoulePerSquareCentimeter, "MillijoulesPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(IrradiationUnit.WattHourPerSquareMeter, "WattHoursPerSquareMeter", BaseUnits.Undefined), + new UnitInfo(IrradiationUnit.JoulePerSquareCentimeter, "JoulesPerSquareCentimeter", BaseUnits.Undefined, "Irradiation"), + new UnitInfo(IrradiationUnit.JoulePerSquareMeter, "JoulesPerSquareMeter", BaseUnits.Undefined, "Irradiation"), + new UnitInfo(IrradiationUnit.JoulePerSquareMillimeter, "JoulesPerSquareMillimeter", BaseUnits.Undefined, "Irradiation"), + new UnitInfo(IrradiationUnit.KilojoulePerSquareMeter, "KilojoulesPerSquareMeter", BaseUnits.Undefined, "Irradiation"), + new UnitInfo(IrradiationUnit.KilowattHourPerSquareMeter, "KilowattHoursPerSquareMeter", BaseUnits.Undefined, "Irradiation"), + new UnitInfo(IrradiationUnit.MillijoulePerSquareCentimeter, "MillijoulesPerSquareCentimeter", BaseUnits.Undefined, "Irradiation"), + new UnitInfo(IrradiationUnit.WattHourPerSquareMeter, "WattHoursPerSquareMeter", BaseUnits.Undefined, "Irradiation"), }, BaseUnit, Zero, BaseDimensions); @@ -243,17 +243,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(IrradiationUnit.JoulePerSquareMeter, IrradiationUnit.WattHourPerSquareMeter, quantity => quantity.ToUnit(IrradiationUnit.WattHourPerSquareMeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(IrradiationUnit.JoulePerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"J/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradiationUnit.JoulePerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"J/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradiationUnit.JoulePerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"J/mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradiationUnit.KilojoulePerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kJ/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradiationUnit.KilowattHourPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kWh/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradiationUnit.MillijoulePerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mJ/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(IrradiationUnit.WattHourPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"Wh/m²"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs index c2227502c4..db924ffb0b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs @@ -65,17 +65,17 @@ static Jerk() Info = new QuantityInfo("Jerk", new UnitInfo[] { - new UnitInfo(JerkUnit.CentimeterPerSecondCubed, "CentimetersPerSecondCubed", BaseUnits.Undefined), - new UnitInfo(JerkUnit.DecimeterPerSecondCubed, "DecimetersPerSecondCubed", BaseUnits.Undefined), - new UnitInfo(JerkUnit.FootPerSecondCubed, "FeetPerSecondCubed", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Second)), - new UnitInfo(JerkUnit.InchPerSecondCubed, "InchesPerSecondCubed", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second)), - new UnitInfo(JerkUnit.KilometerPerSecondCubed, "KilometersPerSecondCubed", BaseUnits.Undefined), - new UnitInfo(JerkUnit.MeterPerSecondCubed, "MetersPerSecondCubed", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second)), - new UnitInfo(JerkUnit.MicrometerPerSecondCubed, "MicrometersPerSecondCubed", BaseUnits.Undefined), - new UnitInfo(JerkUnit.MillimeterPerSecondCubed, "MillimetersPerSecondCubed", BaseUnits.Undefined), - new UnitInfo(JerkUnit.MillistandardGravitiesPerSecond, "MillistandardGravitiesPerSecond", BaseUnits.Undefined), - new UnitInfo(JerkUnit.NanometerPerSecondCubed, "NanometersPerSecondCubed", BaseUnits.Undefined), - new UnitInfo(JerkUnit.StandardGravitiesPerSecond, "StandardGravitiesPerSecond", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second)), + new UnitInfo(JerkUnit.CentimeterPerSecondCubed, "CentimetersPerSecondCubed", BaseUnits.Undefined, "Jerk"), + new UnitInfo(JerkUnit.DecimeterPerSecondCubed, "DecimetersPerSecondCubed", BaseUnits.Undefined, "Jerk"), + new UnitInfo(JerkUnit.FootPerSecondCubed, "FeetPerSecondCubed", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Second), "Jerk"), + new UnitInfo(JerkUnit.InchPerSecondCubed, "InchesPerSecondCubed", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second), "Jerk"), + new UnitInfo(JerkUnit.KilometerPerSecondCubed, "KilometersPerSecondCubed", BaseUnits.Undefined, "Jerk"), + new UnitInfo(JerkUnit.MeterPerSecondCubed, "MetersPerSecondCubed", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second), "Jerk"), + new UnitInfo(JerkUnit.MicrometerPerSecondCubed, "MicrometersPerSecondCubed", BaseUnits.Undefined, "Jerk"), + new UnitInfo(JerkUnit.MillimeterPerSecondCubed, "MillimetersPerSecondCubed", BaseUnits.Undefined, "Jerk"), + new UnitInfo(JerkUnit.MillistandardGravitiesPerSecond, "MillistandardGravitiesPerSecond", BaseUnits.Undefined, "Jerk"), + new UnitInfo(JerkUnit.NanometerPerSecondCubed, "NanometersPerSecondCubed", BaseUnits.Undefined, "Jerk"), + new UnitInfo(JerkUnit.StandardGravitiesPerSecond, "StandardGravitiesPerSecond", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second), "Jerk"), }, BaseUnit, Zero, BaseDimensions); @@ -272,32 +272,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(JerkUnit.MeterPerSecondCubed, JerkUnit.StandardGravitiesPerSecond, quantity => quantity.ToUnit(JerkUnit.StandardGravitiesPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.CentimeterPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"cm/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.CentimeterPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"см/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.DecimeterPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"dm/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.DecimeterPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"дм/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.FootPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"ft/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.FootPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"фут/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.InchPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"in/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.InchPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"дюйм/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.KilometerPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"km/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.KilometerPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"км/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MeterPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"m/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MeterPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"м/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MicrometerPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"µm/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MicrometerPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"мкм/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MillimeterPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"mm/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MillimeterPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"мм/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MillistandardGravitiesPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mg/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.MillistandardGravitiesPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мg/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.NanometerPerSecondCubed, new CultureInfo("en-US"), false, true, new string[]{"nm/s³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.NanometerPerSecondCubed, new CultureInfo("ru-RU"), false, true, new string[]{"нм/с³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.StandardGravitiesPerSecond, new CultureInfo("en-US"), false, true, new string[]{"g/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(JerkUnit.StandardGravitiesPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"g/s"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs index e55cb266b9..414ac15d65 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs @@ -68,15 +68,15 @@ static KinematicViscosity() Info = new QuantityInfo("KinematicViscosity", new UnitInfo[] { - new UnitInfo(KinematicViscosityUnit.Centistokes, "Centistokes", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.Decistokes, "Decistokes", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.Kilostokes, "Kilostokes", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.Microstokes, "Microstokes", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.Millistokes, "Millistokes", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.Nanostokes, "Nanostokes", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.SquareFootPerSecond, "SquareFeetPerSecond", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.SquareMeterPerSecond, "SquareMetersPerSecond", BaseUnits.Undefined), - new UnitInfo(KinematicViscosityUnit.Stokes, "Stokes", BaseUnits.Undefined), + new UnitInfo(KinematicViscosityUnit.Centistokes, "Centistokes", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.Decistokes, "Decistokes", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.Kilostokes, "Kilostokes", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.Microstokes, "Microstokes", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.Millistokes, "Millistokes", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.Nanostokes, "Nanostokes", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.SquareFootPerSecond, "SquareFeetPerSecond", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.SquareMeterPerSecond, "SquareMetersPerSecond", BaseUnits.Undefined, "KinematicViscosity"), + new UnitInfo(KinematicViscosityUnit.Stokes, "Stokes", BaseUnits.Undefined, "KinematicViscosity"), }, BaseUnit, Zero, BaseDimensions); @@ -259,27 +259,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(KinematicViscosityUnit.SquareMeterPerSecond, KinematicViscosityUnit.Stokes, quantity => quantity.ToUnit(KinematicViscosityUnit.Stokes)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Centistokes, new CultureInfo("en-US"), false, true, new string[]{"cSt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Centistokes, new CultureInfo("ru-RU"), false, true, new string[]{"сСт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Decistokes, new CultureInfo("en-US"), false, true, new string[]{"dSt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Decistokes, new CultureInfo("ru-RU"), false, true, new string[]{"дСт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Kilostokes, new CultureInfo("en-US"), false, true, new string[]{"kSt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Kilostokes, new CultureInfo("ru-RU"), false, true, new string[]{"кСт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Microstokes, new CultureInfo("en-US"), false, true, new string[]{"µSt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Microstokes, new CultureInfo("ru-RU"), false, true, new string[]{"мкСт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Millistokes, new CultureInfo("en-US"), false, true, new string[]{"mSt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Millistokes, new CultureInfo("ru-RU"), false, true, new string[]{"мСт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Nanostokes, new CultureInfo("en-US"), false, true, new string[]{"nSt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Nanostokes, new CultureInfo("ru-RU"), false, true, new string[]{"нСт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.SquareFootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"ft²/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.SquareMeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"m²/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.SquareMeterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"м²/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Stokes, new CultureInfo("en-US"), false, true, new string[]{"St"}); - unitAbbreviationsCache.PerformAbbreviationMapping(KinematicViscosityUnit.Stokes, new CultureInfo("ru-RU"), false, true, new string[]{"Ст"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/LeakRate.g.cs b/UnitsNet/GeneratedCode/Quantities/LeakRate.g.cs index 914bb5c26c..d349f0af22 100644 --- a/UnitsNet/GeneratedCode/Quantities/LeakRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LeakRate.g.cs @@ -68,9 +68,9 @@ static LeakRate() Info = new QuantityInfo("LeakRate", new UnitInfo[] { - new UnitInfo(LeakRateUnit.MillibarLiterPerSecond, "MillibarLitersPerSecond", BaseUnits.Undefined), - new UnitInfo(LeakRateUnit.PascalCubicMeterPerSecond, "PascalCubicMetersPerSecond", BaseUnits.Undefined), - new UnitInfo(LeakRateUnit.TorrLiterPerSecond, "TorrLitersPerSecond", BaseUnits.Undefined), + new UnitInfo(LeakRateUnit.MillibarLiterPerSecond, "MillibarLitersPerSecond", BaseUnits.Undefined, "LeakRate"), + new UnitInfo(LeakRateUnit.PascalCubicMeterPerSecond, "PascalCubicMetersPerSecond", BaseUnits.Undefined, "LeakRate"), + new UnitInfo(LeakRateUnit.TorrLiterPerSecond, "TorrLitersPerSecond", BaseUnits.Undefined, "LeakRate"), }, BaseUnit, Zero, BaseDimensions); @@ -211,13 +211,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(LeakRateUnit.PascalCubicMeterPerSecond, LeakRateUnit.TorrLiterPerSecond, quantity => quantity.ToUnit(LeakRateUnit.TorrLiterPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LeakRateUnit.MillibarLiterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mbar·l/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LeakRateUnit.PascalCubicMeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Pa·m³/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LeakRateUnit.TorrLiterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Torr·l/s"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Length.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.g.cs index 1fd58e04f2..048f7bb17a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.g.cs @@ -65,43 +65,43 @@ static Length() Info = new QuantityInfo("Length", new UnitInfo[] { - new UnitInfo(LengthUnit.Angstrom, "Angstroms", BaseUnits.Undefined), - new UnitInfo(LengthUnit.AstronomicalUnit, "AstronomicalUnits", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Centimeter, "Centimeters", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Chain, "Chains", new BaseUnits(length: LengthUnit.Chain)), - new UnitInfo(LengthUnit.DataMile, "DataMiles", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Decameter, "Decameters", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Decimeter, "Decimeters", BaseUnits.Undefined), - new UnitInfo(LengthUnit.DtpPica, "DtpPicas", new BaseUnits(length: LengthUnit.DtpPica)), - new UnitInfo(LengthUnit.DtpPoint, "DtpPoints", new BaseUnits(length: LengthUnit.DtpPoint)), - new UnitInfo(LengthUnit.Fathom, "Fathoms", new BaseUnits(length: LengthUnit.Fathom)), - new UnitInfo(LengthUnit.Foot, "Feet", new BaseUnits(length: LengthUnit.Foot)), - new UnitInfo(LengthUnit.Hand, "Hands", new BaseUnits(length: LengthUnit.Hand)), - new UnitInfo(LengthUnit.Hectometer, "Hectometers", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Inch, "Inches", new BaseUnits(length: LengthUnit.Inch)), - new UnitInfo(LengthUnit.KilolightYear, "KilolightYears", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Kilometer, "Kilometers", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Kiloparsec, "Kiloparsecs", BaseUnits.Undefined), - new UnitInfo(LengthUnit.LightYear, "LightYears", BaseUnits.Undefined), - new UnitInfo(LengthUnit.MegalightYear, "MegalightYears", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Megameter, "Megameters", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Megaparsec, "Megaparsecs", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Meter, "Meters", new BaseUnits(length: LengthUnit.Meter)), - new UnitInfo(LengthUnit.Microinch, "Microinches", new BaseUnits(length: LengthUnit.Microinch)), - new UnitInfo(LengthUnit.Micrometer, "Micrometers", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Mil, "Mils", new BaseUnits(length: LengthUnit.Mil)), - new UnitInfo(LengthUnit.Mile, "Miles", new BaseUnits(length: LengthUnit.Mile)), - new UnitInfo(LengthUnit.Millimeter, "Millimeters", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Nanometer, "Nanometers", BaseUnits.Undefined), - new UnitInfo(LengthUnit.NauticalMile, "NauticalMiles", new BaseUnits(length: LengthUnit.NauticalMile)), - new UnitInfo(LengthUnit.Parsec, "Parsecs", BaseUnits.Undefined), - new UnitInfo(LengthUnit.PrinterPica, "PrinterPicas", new BaseUnits(length: LengthUnit.PrinterPica)), - new UnitInfo(LengthUnit.PrinterPoint, "PrinterPoints", new BaseUnits(length: LengthUnit.PrinterPoint)), - new UnitInfo(LengthUnit.Shackle, "Shackles", new BaseUnits(length: LengthUnit.Shackle)), - new UnitInfo(LengthUnit.SolarRadius, "SolarRadiuses", BaseUnits.Undefined), - new UnitInfo(LengthUnit.Twip, "Twips", new BaseUnits(length: LengthUnit.Twip)), - new UnitInfo(LengthUnit.UsSurveyFoot, "UsSurveyFeet", new BaseUnits(length: LengthUnit.UsSurveyFoot)), - new UnitInfo(LengthUnit.Yard, "Yards", new BaseUnits(length: LengthUnit.Yard)), + new UnitInfo(LengthUnit.Angstrom, "Angstroms", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.AstronomicalUnit, "AstronomicalUnits", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Centimeter, "Centimeters", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Chain, "Chains", new BaseUnits(length: LengthUnit.Chain), "Length"), + new UnitInfo(LengthUnit.DataMile, "DataMiles", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Decameter, "Decameters", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Decimeter, "Decimeters", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.DtpPica, "DtpPicas", new BaseUnits(length: LengthUnit.DtpPica), "Length"), + new UnitInfo(LengthUnit.DtpPoint, "DtpPoints", new BaseUnits(length: LengthUnit.DtpPoint), "Length"), + new UnitInfo(LengthUnit.Fathom, "Fathoms", new BaseUnits(length: LengthUnit.Fathom), "Length"), + new UnitInfo(LengthUnit.Foot, "Feet", new BaseUnits(length: LengthUnit.Foot), "Length"), + new UnitInfo(LengthUnit.Hand, "Hands", new BaseUnits(length: LengthUnit.Hand), "Length"), + new UnitInfo(LengthUnit.Hectometer, "Hectometers", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Inch, "Inches", new BaseUnits(length: LengthUnit.Inch), "Length"), + new UnitInfo(LengthUnit.KilolightYear, "KilolightYears", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Kilometer, "Kilometers", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Kiloparsec, "Kiloparsecs", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.LightYear, "LightYears", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.MegalightYear, "MegalightYears", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Megameter, "Megameters", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Megaparsec, "Megaparsecs", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Meter, "Meters", new BaseUnits(length: LengthUnit.Meter), "Length"), + new UnitInfo(LengthUnit.Microinch, "Microinches", new BaseUnits(length: LengthUnit.Microinch), "Length"), + new UnitInfo(LengthUnit.Micrometer, "Micrometers", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Mil, "Mils", new BaseUnits(length: LengthUnit.Mil), "Length"), + new UnitInfo(LengthUnit.Mile, "Miles", new BaseUnits(length: LengthUnit.Mile), "Length"), + new UnitInfo(LengthUnit.Millimeter, "Millimeters", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Nanometer, "Nanometers", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.NauticalMile, "NauticalMiles", new BaseUnits(length: LengthUnit.NauticalMile), "Length"), + new UnitInfo(LengthUnit.Parsec, "Parsecs", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.PrinterPica, "PrinterPicas", new BaseUnits(length: LengthUnit.PrinterPica), "Length"), + new UnitInfo(LengthUnit.PrinterPoint, "PrinterPoints", new BaseUnits(length: LengthUnit.PrinterPoint), "Length"), + new UnitInfo(LengthUnit.Shackle, "Shackles", new BaseUnits(length: LengthUnit.Shackle), "Length"), + new UnitInfo(LengthUnit.SolarRadius, "SolarRadiuses", BaseUnits.Undefined, "Length"), + new UnitInfo(LengthUnit.Twip, "Twips", new BaseUnits(length: LengthUnit.Twip), "Length"), + new UnitInfo(LengthUnit.UsSurveyFoot, "UsSurveyFeet", new BaseUnits(length: LengthUnit.UsSurveyFoot), "Length"), + new UnitInfo(LengthUnit.Yard, "Yards", new BaseUnits(length: LengthUnit.Yard), "Length"), }, BaseUnit, Zero, BaseDimensions); @@ -480,81 +480,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(LengthUnit.Meter, LengthUnit.Yard, quantity => quantity.ToUnit(LengthUnit.Yard)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Angstrom, new CultureInfo("en-US"), false, true, new string[]{"Å", "A"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.AstronomicalUnit, new CultureInfo("en-US"), false, true, new string[]{"au", "ua"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Centimeter, new CultureInfo("en-US"), false, true, new string[]{"cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Centimeter, new CultureInfo("ru-RU"), false, true, new string[]{"см"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Centimeter, new CultureInfo("zh-CN"), false, true, new string[]{"厘米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Chain, new CultureInfo("en-US"), false, true, new string[]{"ch"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.DataMile, new CultureInfo("en-US"), false, true, new string[]{"DM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Decameter, new CultureInfo("en-US"), false, true, new string[]{"dam"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Decameter, new CultureInfo("ru-RU"), false, true, new string[]{"дам"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Decameter, new CultureInfo("zh-CN"), false, true, new string[]{"十米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Decimeter, new CultureInfo("en-US"), false, true, new string[]{"dm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Decimeter, new CultureInfo("ru-RU"), false, true, new string[]{"дм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Decimeter, new CultureInfo("zh-CN"), false, true, new string[]{"分米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.DtpPica, new CultureInfo("en-US"), false, true, new string[]{"pica"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.DtpPoint, new CultureInfo("en-US"), false, true, new string[]{"pt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Fathom, new CultureInfo("en-US"), false, true, new string[]{"fathom"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Foot, new CultureInfo("en-US"), false, true, new string[]{"ft", "'", "′"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Foot, new CultureInfo("ru-RU"), false, true, new string[]{"фут"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Foot, new CultureInfo("zh-CN"), false, true, new string[]{"英尺"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Hand, new CultureInfo("en-US"), false, true, new string[]{"h", "hh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Hectometer, new CultureInfo("en-US"), false, true, new string[]{"hm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Hectometer, new CultureInfo("ru-RU"), false, true, new string[]{"гм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Hectometer, new CultureInfo("zh-CN"), false, true, new string[]{"百米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Inch, new CultureInfo("en-US"), false, true, new string[]{"in", "\"", "″"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Inch, new CultureInfo("ru-RU"), false, true, new string[]{"дюйм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Inch, new CultureInfo("zh-CN"), false, true, new string[]{"英寸"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.KilolightYear, new CultureInfo("en-US"), false, true, new string[]{"kly"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Kilometer, new CultureInfo("en-US"), false, true, new string[]{"km"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Kilometer, new CultureInfo("ru-RU"), false, true, new string[]{"км"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Kilometer, new CultureInfo("zh-CN"), false, true, new string[]{"千米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Kiloparsec, new CultureInfo("en-US"), false, true, new string[]{"kpc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.LightYear, new CultureInfo("en-US"), false, true, new string[]{"ly"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.MegalightYear, new CultureInfo("en-US"), false, true, new string[]{"Mly"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Megameter, new CultureInfo("en-US"), false, true, new string[]{"Mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Megameter, new CultureInfo("ru-RU"), false, true, new string[]{"Мм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Megameter, new CultureInfo("zh-CN"), false, true, new string[]{"兆米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Megaparsec, new CultureInfo("en-US"), false, true, new string[]{"Mpc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Meter, new CultureInfo("en-US"), false, true, new string[]{"m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Meter, new CultureInfo("ru-RU"), false, true, new string[]{"м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Meter, new CultureInfo("zh-CN"), false, true, new string[]{"米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Microinch, new CultureInfo("en-US"), false, true, new string[]{"µin"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Microinch, new CultureInfo("ru-RU"), false, true, new string[]{"микродюйм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Microinch, new CultureInfo("zh-CN"), false, true, new string[]{"微英寸"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Micrometer, new CultureInfo("en-US"), false, true, new string[]{"µm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Micrometer, new CultureInfo("ru-RU"), false, true, new string[]{"мкм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Micrometer, new CultureInfo("zh-CN"), false, true, new string[]{"微米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Mil, new CultureInfo("en-US"), false, true, new string[]{"mil"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Mil, new CultureInfo("ru-RU"), false, true, new string[]{"мил"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Mil, new CultureInfo("zh-CN"), false, true, new string[]{"密耳"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Mile, new CultureInfo("en-US"), false, true, new string[]{"mi"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Mile, new CultureInfo("ru-RU"), false, true, new string[]{"миля"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Mile, new CultureInfo("zh-CN"), false, true, new string[]{"英里"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Millimeter, new CultureInfo("en-US"), false, true, new string[]{"mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Millimeter, new CultureInfo("ru-RU"), false, true, new string[]{"мм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Millimeter, new CultureInfo("zh-CN"), false, true, new string[]{"毫米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Nanometer, new CultureInfo("en-US"), false, true, new string[]{"nm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Nanometer, new CultureInfo("ru-RU"), false, true, new string[]{"нм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Nanometer, new CultureInfo("zh-CN"), false, true, new string[]{"纳米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.NauticalMile, new CultureInfo("en-US"), false, true, new string[]{"NM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.NauticalMile, new CultureInfo("ru-RU"), false, true, new string[]{"мил"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.NauticalMile, new CultureInfo("zh-CN"), false, true, new string[]{"纳米"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Parsec, new CultureInfo("en-US"), false, true, new string[]{"pc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.PrinterPica, new CultureInfo("en-US"), false, true, new string[]{"pica"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.PrinterPoint, new CultureInfo("en-US"), false, true, new string[]{"pt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Shackle, new CultureInfo("en-US"), false, true, new string[]{"shackle"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.SolarRadius, new CultureInfo("en-US"), false, true, new string[]{"R⊙"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Twip, new CultureInfo("en-US"), false, true, new string[]{"twip"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.UsSurveyFoot, new CultureInfo("en-US"), false, true, new string[]{"ftUS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Yard, new CultureInfo("en-US"), false, true, new string[]{"yd"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Yard, new CultureInfo("ru-RU"), false, true, new string[]{"ярд"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LengthUnit.Yard, new CultureInfo("zh-CN"), false, true, new string[]{"码"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Level.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.g.cs index c763e65424..6443d4c672 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.g.cs @@ -65,8 +65,8 @@ static Level() Info = new QuantityInfo("Level", new UnitInfo[] { - new UnitInfo(LevelUnit.Decibel, "Decibels", BaseUnits.Undefined), - new UnitInfo(LevelUnit.Neper, "Nepers", BaseUnits.Undefined), + new UnitInfo(LevelUnit.Decibel, "Decibels", BaseUnits.Undefined, "Level"), + new UnitInfo(LevelUnit.Neper, "Nepers", BaseUnits.Undefined, "Level"), }, BaseUnit, Zero, BaseDimensions); @@ -200,12 +200,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(LevelUnit.Decibel, LevelUnit.Neper, quantity => quantity.ToUnit(LevelUnit.Neper)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LevelUnit.Decibel, new CultureInfo("en-US"), false, true, new string[]{"dB"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LevelUnit.Neper, new CultureInfo("en-US"), false, true, new string[]{"Np"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs index 6fcb4fad2e..d02dc559c2 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs @@ -68,20 +68,20 @@ static LinearDensity() Info = new QuantityInfo("LinearDensity", new UnitInfo[] { - new UnitInfo(LinearDensityUnit.GramPerCentimeter, "GramsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.GramPerMeter, "GramsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.GramPerMillimeter, "GramsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.KilogramPerCentimeter, "KilogramsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.KilogramPerMeter, "KilogramsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.KilogramPerMillimeter, "KilogramsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.MicrogramPerCentimeter, "MicrogramsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.MicrogramPerMeter, "MicrogramsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.MicrogramPerMillimeter, "MicrogramsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.MilligramPerCentimeter, "MilligramsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.MilligramPerMeter, "MilligramsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.MilligramPerMillimeter, "MilligramsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.PoundPerFoot, "PoundsPerFoot", BaseUnits.Undefined), - new UnitInfo(LinearDensityUnit.PoundPerInch, "PoundsPerInch", BaseUnits.Undefined), + new UnitInfo(LinearDensityUnit.GramPerCentimeter, "GramsPerCentimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.GramPerMeter, "GramsPerMeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.GramPerMillimeter, "GramsPerMillimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.KilogramPerCentimeter, "KilogramsPerCentimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.KilogramPerMeter, "KilogramsPerMeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.KilogramPerMillimeter, "KilogramsPerMillimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.MicrogramPerCentimeter, "MicrogramsPerCentimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.MicrogramPerMeter, "MicrogramsPerMeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.MicrogramPerMillimeter, "MicrogramsPerMillimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.MilligramPerCentimeter, "MilligramsPerCentimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.MilligramPerMeter, "MilligramsPerMeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.MilligramPerMillimeter, "MilligramsPerMillimeter", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.PoundPerFoot, "PoundsPerFoot", BaseUnits.Undefined, "LinearDensity"), + new UnitInfo(LinearDensityUnit.PoundPerInch, "PoundsPerInch", BaseUnits.Undefined, "LinearDensity"), }, BaseUnit, Zero, BaseDimensions); @@ -299,24 +299,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(LinearDensityUnit.KilogramPerMeter, LinearDensityUnit.PoundPerInch, quantity => quantity.ToUnit(LinearDensityUnit.PoundPerInch)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.GramPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"g/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.GramPerMeter, new CultureInfo("en-US"), false, true, new string[]{"g/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.GramPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"g/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.KilogramPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kg/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.KilogramPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kg/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.KilogramPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kg/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.MicrogramPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"µg/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.MicrogramPerMeter, new CultureInfo("en-US"), false, true, new string[]{"µg/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.MicrogramPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"µg/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.MilligramPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mg/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.MilligramPerMeter, new CultureInfo("en-US"), false, true, new string[]{"mg/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.MilligramPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mg/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.PoundPerFoot, new CultureInfo("en-US"), false, true, new string[]{"lb/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearDensityUnit.PoundPerInch, new CultureInfo("en-US"), false, true, new string[]{"lb/in"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs index 76510cb5e5..9da65290a2 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs @@ -68,31 +68,31 @@ static LinearPowerDensity() Info = new QuantityInfo("LinearPowerDensity", new UnitInfo[] { - new UnitInfo(LinearPowerDensityUnit.GigawattPerCentimeter, "GigawattsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.GigawattPerFoot, "GigawattsPerFoot", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.GigawattPerInch, "GigawattsPerInch", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.GigawattPerMeter, "GigawattsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.GigawattPerMillimeter, "GigawattsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.KilowattPerCentimeter, "KilowattsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.KilowattPerFoot, "KilowattsPerFoot", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.KilowattPerInch, "KilowattsPerInch", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.KilowattPerMeter, "KilowattsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.KilowattPerMillimeter, "KilowattsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MegawattPerCentimeter, "MegawattsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MegawattPerFoot, "MegawattsPerFoot", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MegawattPerInch, "MegawattsPerInch", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MegawattPerMeter, "MegawattsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MegawattPerMillimeter, "MegawattsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MilliwattPerCentimeter, "MilliwattsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MilliwattPerFoot, "MilliwattsPerFoot", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MilliwattPerInch, "MilliwattsPerInch", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MilliwattPerMeter, "MilliwattsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.MilliwattPerMillimeter, "MilliwattsPerMillimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.WattPerCentimeter, "WattsPerCentimeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.WattPerFoot, "WattsPerFoot", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.WattPerInch, "WattsPerInch", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.WattPerMeter, "WattsPerMeter", BaseUnits.Undefined), - new UnitInfo(LinearPowerDensityUnit.WattPerMillimeter, "WattsPerMillimeter", BaseUnits.Undefined), + new UnitInfo(LinearPowerDensityUnit.GigawattPerCentimeter, "GigawattsPerCentimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.GigawattPerFoot, "GigawattsPerFoot", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.GigawattPerInch, "GigawattsPerInch", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.GigawattPerMeter, "GigawattsPerMeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.GigawattPerMillimeter, "GigawattsPerMillimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.KilowattPerCentimeter, "KilowattsPerCentimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.KilowattPerFoot, "KilowattsPerFoot", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.KilowattPerInch, "KilowattsPerInch", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.KilowattPerMeter, "KilowattsPerMeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.KilowattPerMillimeter, "KilowattsPerMillimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MegawattPerCentimeter, "MegawattsPerCentimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MegawattPerFoot, "MegawattsPerFoot", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MegawattPerInch, "MegawattsPerInch", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MegawattPerMeter, "MegawattsPerMeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MegawattPerMillimeter, "MegawattsPerMillimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MilliwattPerCentimeter, "MilliwattsPerCentimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MilliwattPerFoot, "MilliwattsPerFoot", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MilliwattPerInch, "MilliwattsPerInch", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MilliwattPerMeter, "MilliwattsPerMeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.MilliwattPerMillimeter, "MilliwattsPerMillimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.WattPerCentimeter, "WattsPerCentimeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.WattPerFoot, "WattsPerFoot", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.WattPerInch, "WattsPerInch", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.WattPerMeter, "WattsPerMeter", BaseUnits.Undefined, "LinearPowerDensity"), + new UnitInfo(LinearPowerDensityUnit.WattPerMillimeter, "WattsPerMillimeter", BaseUnits.Undefined, "LinearPowerDensity"), }, BaseUnit, Zero, BaseDimensions); @@ -387,35 +387,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(LinearPowerDensityUnit.WattPerMeter, LinearPowerDensityUnit.WattPerMillimeter, quantity => quantity.ToUnit(LinearPowerDensityUnit.WattPerMillimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.GigawattPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"GW/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.GigawattPerFoot, new CultureInfo("en-US"), false, true, new string[]{"GW/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.GigawattPerInch, new CultureInfo("en-US"), false, true, new string[]{"GW/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.GigawattPerMeter, new CultureInfo("en-US"), false, true, new string[]{"GW/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.GigawattPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"GW/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.KilowattPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kW/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.KilowattPerFoot, new CultureInfo("en-US"), false, true, new string[]{"kW/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.KilowattPerInch, new CultureInfo("en-US"), false, true, new string[]{"kW/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.KilowattPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kW/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.KilowattPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kW/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MegawattPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"MW/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MegawattPerFoot, new CultureInfo("en-US"), false, true, new string[]{"MW/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MegawattPerInch, new CultureInfo("en-US"), false, true, new string[]{"MW/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MegawattPerMeter, new CultureInfo("en-US"), false, true, new string[]{"MW/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MegawattPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"MW/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MilliwattPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mW/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MilliwattPerFoot, new CultureInfo("en-US"), false, true, new string[]{"mW/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MilliwattPerInch, new CultureInfo("en-US"), false, true, new string[]{"mW/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MilliwattPerMeter, new CultureInfo("en-US"), false, true, new string[]{"mW/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.MilliwattPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mW/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.WattPerCentimeter, new CultureInfo("en-US"), false, true, new string[]{"W/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.WattPerFoot, new CultureInfo("en-US"), false, true, new string[]{"W/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.WattPerInch, new CultureInfo("en-US"), false, true, new string[]{"W/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.WattPerMeter, new CultureInfo("en-US"), false, true, new string[]{"W/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LinearPowerDensityUnit.WattPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"W/mm"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs index 87836693de..40a249863e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs @@ -68,16 +68,16 @@ static Luminance() Info = new QuantityInfo("Luminance", new UnitInfo[] { - new UnitInfo(LuminanceUnit.CandelaPerSquareFoot, "CandelasPerSquareFoot", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.CandelaPerSquareInch, "CandelasPerSquareInch", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.CandelaPerSquareMeter, "CandelasPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, luminousIntensity: LuminousIntensityUnit.Candela)), - new UnitInfo(LuminanceUnit.CenticandelaPerSquareMeter, "CenticandelasPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.DecicandelaPerSquareMeter, "DecicandelasPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.KilocandelaPerSquareMeter, "KilocandelasPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.MicrocandelaPerSquareMeter, "MicrocandelasPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.MillicandelaPerSquareMeter, "MillicandelasPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.NanocandelaPerSquareMeter, "NanocandelasPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(LuminanceUnit.Nit, "Nits", BaseUnits.Undefined), + new UnitInfo(LuminanceUnit.CandelaPerSquareFoot, "CandelasPerSquareFoot", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.CandelaPerSquareInch, "CandelasPerSquareInch", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.CandelaPerSquareMeter, "CandelasPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, luminousIntensity: LuminousIntensityUnit.Candela), "Luminance"), + new UnitInfo(LuminanceUnit.CenticandelaPerSquareMeter, "CenticandelasPerSquareMeter", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.DecicandelaPerSquareMeter, "DecicandelasPerSquareMeter", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.KilocandelaPerSquareMeter, "KilocandelasPerSquareMeter", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.MicrocandelaPerSquareMeter, "MicrocandelasPerSquareMeter", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.MillicandelaPerSquareMeter, "MillicandelasPerSquareMeter", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.NanocandelaPerSquareMeter, "NanocandelasPerSquareMeter", BaseUnits.Undefined, "Luminance"), + new UnitInfo(LuminanceUnit.Nit, "Nits", BaseUnits.Undefined, "Luminance"), }, BaseUnit, Zero, BaseDimensions); @@ -267,20 +267,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(LuminanceUnit.CandelaPerSquareMeter, LuminanceUnit.Nit, quantity => quantity.ToUnit(LuminanceUnit.Nit)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.CandelaPerSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"Cd/ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.CandelaPerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"Cd/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.CandelaPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"Cd/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.CenticandelaPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"cCd/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.DecicandelaPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"dCd/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.KilocandelaPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kCd/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.MicrocandelaPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"µCd/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.MillicandelaPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"mCd/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.NanocandelaPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"nCd/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminanceUnit.Nit, new CultureInfo("en-US"), false, true, new string[]{"nt"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs index eb943f5f1c..e021be7d39 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs @@ -68,20 +68,20 @@ static Luminosity() Info = new QuantityInfo("Luminosity", new UnitInfo[] { - new UnitInfo(LuminosityUnit.Decawatt, "Decawatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Deciwatt, "Deciwatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Femtowatt, "Femtowatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Gigawatt, "Gigawatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Kilowatt, "Kilowatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Megawatt, "Megawatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Microwatt, "Microwatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Milliwatt, "Milliwatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Nanowatt, "Nanowatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Petawatt, "Petawatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Picowatt, "Picowatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.SolarLuminosity, "SolarLuminosities", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Terawatt, "Terawatts", BaseUnits.Undefined), - new UnitInfo(LuminosityUnit.Watt, "Watts", BaseUnits.Undefined), + new UnitInfo(LuminosityUnit.Decawatt, "Decawatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Deciwatt, "Deciwatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Femtowatt, "Femtowatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Gigawatt, "Gigawatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Kilowatt, "Kilowatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Megawatt, "Megawatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Microwatt, "Microwatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Milliwatt, "Milliwatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Nanowatt, "Nanowatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Petawatt, "Petawatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Picowatt, "Picowatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.SolarLuminosity, "SolarLuminosities", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Terawatt, "Terawatts", BaseUnits.Undefined, "Luminosity"), + new UnitInfo(LuminosityUnit.Watt, "Watts", BaseUnits.Undefined, "Luminosity"), }, BaseUnit, Zero, BaseDimensions); @@ -299,24 +299,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(LuminosityUnit.Watt, LuminosityUnit.Terawatt, quantity => quantity.ToUnit(LuminosityUnit.Terawatt)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Decawatt, new CultureInfo("en-US"), false, true, new string[]{"daW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Deciwatt, new CultureInfo("en-US"), false, true, new string[]{"dW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Femtowatt, new CultureInfo("en-US"), false, true, new string[]{"fW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Gigawatt, new CultureInfo("en-US"), false, true, new string[]{"GW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Kilowatt, new CultureInfo("en-US"), false, true, new string[]{"kW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Megawatt, new CultureInfo("en-US"), false, true, new string[]{"MW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Microwatt, new CultureInfo("en-US"), false, true, new string[]{"µW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Milliwatt, new CultureInfo("en-US"), false, true, new string[]{"mW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Nanowatt, new CultureInfo("en-US"), false, true, new string[]{"nW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Petawatt, new CultureInfo("en-US"), false, true, new string[]{"PW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Picowatt, new CultureInfo("en-US"), false, true, new string[]{"pW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.SolarLuminosity, new CultureInfo("en-US"), false, true, new string[]{"L⊙"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Terawatt, new CultureInfo("en-US"), false, true, new string[]{"TW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(LuminosityUnit.Watt, new CultureInfo("en-US"), false, true, new string[]{"W"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs index bae3ab5606..945df89db8 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs @@ -68,7 +68,7 @@ static LuminousFlux() Info = new QuantityInfo("LuminousFlux", new UnitInfo[] { - new UnitInfo(LuminousFluxUnit.Lumen, "Lumens", BaseUnits.Undefined), + new UnitInfo(LuminousFluxUnit.Lumen, "Lumens", BaseUnits.Undefined, "LuminousFlux"), }, BaseUnit, Zero, BaseDimensions); @@ -195,11 +195,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> LuminousFluxUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LuminousFluxUnit.Lumen, new CultureInfo("en-US"), false, true, new string[]{"lm"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs index 0663d94938..31b33f17d3 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs @@ -68,7 +68,7 @@ static LuminousIntensity() Info = new QuantityInfo("LuminousIntensity", new UnitInfo[] { - new UnitInfo(LuminousIntensityUnit.Candela, "Candela", new BaseUnits(luminousIntensity: LuminousIntensityUnit.Candela)), + new UnitInfo(LuminousIntensityUnit.Candela, "Candela", new BaseUnits(luminousIntensity: LuminousIntensityUnit.Candela), "LuminousIntensity"), }, BaseUnit, Zero, BaseDimensions); @@ -195,11 +195,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> LuminousIntensityUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(LuminousIntensityUnit.Candela, new CultureInfo("en-US"), false, true, new string[]{"cd"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs index 16bb353b2f..3c73a5905b 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs @@ -68,12 +68,12 @@ static MagneticField() Info = new QuantityInfo("MagneticField", new UnitInfo[] { - new UnitInfo(MagneticFieldUnit.Gauss, "Gausses", BaseUnits.Undefined), - new UnitInfo(MagneticFieldUnit.Microtesla, "Microteslas", BaseUnits.Undefined), - new UnitInfo(MagneticFieldUnit.Milligauss, "Milligausses", BaseUnits.Undefined), - new UnitInfo(MagneticFieldUnit.Millitesla, "Milliteslas", BaseUnits.Undefined), - new UnitInfo(MagneticFieldUnit.Nanotesla, "Nanoteslas", BaseUnits.Undefined), - new UnitInfo(MagneticFieldUnit.Tesla, "Teslas", BaseUnits.Undefined), + new UnitInfo(MagneticFieldUnit.Gauss, "Gausses", BaseUnits.Undefined, "MagneticField"), + new UnitInfo(MagneticFieldUnit.Microtesla, "Microteslas", BaseUnits.Undefined, "MagneticField"), + new UnitInfo(MagneticFieldUnit.Milligauss, "Milligausses", BaseUnits.Undefined, "MagneticField"), + new UnitInfo(MagneticFieldUnit.Millitesla, "Milliteslas", BaseUnits.Undefined, "MagneticField"), + new UnitInfo(MagneticFieldUnit.Nanotesla, "Nanoteslas", BaseUnits.Undefined, "MagneticField"), + new UnitInfo(MagneticFieldUnit.Tesla, "Teslas", BaseUnits.Undefined, "MagneticField"), }, BaseUnit, Zero, BaseDimensions); @@ -235,16 +235,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MagneticFieldUnit.Tesla, MagneticFieldUnit.Nanotesla, quantity => quantity.ToUnit(MagneticFieldUnit.Nanotesla)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MagneticFieldUnit.Gauss, new CultureInfo("en-US"), false, true, new string[]{"G"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MagneticFieldUnit.Microtesla, new CultureInfo("en-US"), false, true, new string[]{"µT"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MagneticFieldUnit.Milligauss, new CultureInfo("en-US"), false, true, new string[]{"mG"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MagneticFieldUnit.Millitesla, new CultureInfo("en-US"), false, true, new string[]{"mT"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MagneticFieldUnit.Nanotesla, new CultureInfo("en-US"), false, true, new string[]{"nT"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MagneticFieldUnit.Tesla, new CultureInfo("en-US"), false, true, new string[]{"T"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs index f169a23961..87997b4e5f 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs @@ -68,7 +68,7 @@ static MagneticFlux() Info = new QuantityInfo("MagneticFlux", new UnitInfo[] { - new UnitInfo(MagneticFluxUnit.Weber, "Webers", BaseUnits.Undefined), + new UnitInfo(MagneticFluxUnit.Weber, "Webers", BaseUnits.Undefined, "MagneticFlux"), }, BaseUnit, Zero, BaseDimensions); @@ -195,11 +195,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> MagneticFluxUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MagneticFluxUnit.Weber, new CultureInfo("en-US"), false, true, new string[]{"Wb"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs index 53efd310f1..5dc304eb86 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs @@ -68,7 +68,7 @@ static Magnetization() Info = new QuantityInfo("Magnetization", new UnitInfo[] { - new UnitInfo(MagnetizationUnit.AmperePerMeter, "AmperesPerMeter", new BaseUnits(length: LengthUnit.Meter, current: ElectricCurrentUnit.Ampere)), + new UnitInfo(MagnetizationUnit.AmperePerMeter, "AmperesPerMeter", new BaseUnits(length: LengthUnit.Meter, current: ElectricCurrentUnit.Ampere), "Magnetization"), }, BaseUnit, Zero, BaseDimensions); @@ -195,11 +195,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> MagnetizationUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MagnetizationUnit.AmperePerMeter, new CultureInfo("en-US"), false, true, new string[]{"A/m"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs index 010b169b2d..1a60f8854f 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs @@ -65,33 +65,33 @@ static Mass() Info = new QuantityInfo("Mass", new UnitInfo[] { - new UnitInfo(MassUnit.Centigram, "Centigrams", BaseUnits.Undefined), - new UnitInfo(MassUnit.Decagram, "Decagrams", BaseUnits.Undefined), - new UnitInfo(MassUnit.Decigram, "Decigrams", BaseUnits.Undefined), - new UnitInfo(MassUnit.EarthMass, "EarthMasses", new BaseUnits(mass: MassUnit.EarthMass)), - new UnitInfo(MassUnit.Femtogram, "Femtograms", BaseUnits.Undefined), - new UnitInfo(MassUnit.Grain, "Grains", new BaseUnits(mass: MassUnit.Grain)), - new UnitInfo(MassUnit.Gram, "Grams", new BaseUnits(mass: MassUnit.Gram)), - new UnitInfo(MassUnit.Hectogram, "Hectograms", BaseUnits.Undefined), - new UnitInfo(MassUnit.Kilogram, "Kilograms", BaseUnits.Undefined), - new UnitInfo(MassUnit.Kilopound, "Kilopounds", BaseUnits.Undefined), - new UnitInfo(MassUnit.Kilotonne, "Kilotonnes", BaseUnits.Undefined), - new UnitInfo(MassUnit.LongHundredweight, "LongHundredweight", new BaseUnits(mass: MassUnit.LongHundredweight)), - new UnitInfo(MassUnit.LongTon, "LongTons", new BaseUnits(mass: MassUnit.LongTon)), - new UnitInfo(MassUnit.Megapound, "Megapounds", BaseUnits.Undefined), - new UnitInfo(MassUnit.Megatonne, "Megatonnes", BaseUnits.Undefined), - new UnitInfo(MassUnit.Microgram, "Micrograms", BaseUnits.Undefined), - new UnitInfo(MassUnit.Milligram, "Milligrams", BaseUnits.Undefined), - new UnitInfo(MassUnit.Nanogram, "Nanograms", BaseUnits.Undefined), - new UnitInfo(MassUnit.Ounce, "Ounces", new BaseUnits(mass: MassUnit.Ounce)), - new UnitInfo(MassUnit.Picogram, "Picograms", BaseUnits.Undefined), - new UnitInfo(MassUnit.Pound, "Pounds", new BaseUnits(mass: MassUnit.Pound)), - new UnitInfo(MassUnit.ShortHundredweight, "ShortHundredweight", new BaseUnits(mass: MassUnit.ShortHundredweight)), - new UnitInfo(MassUnit.ShortTon, "ShortTons", new BaseUnits(mass: MassUnit.ShortTon)), - new UnitInfo(MassUnit.Slug, "Slugs", new BaseUnits(mass: MassUnit.Slug)), - new UnitInfo(MassUnit.SolarMass, "SolarMasses", new BaseUnits(mass: MassUnit.SolarMass)), - new UnitInfo(MassUnit.Stone, "Stone", new BaseUnits(mass: MassUnit.Stone)), - new UnitInfo(MassUnit.Tonne, "Tonnes", new BaseUnits(mass: MassUnit.Tonne)), + new UnitInfo(MassUnit.Centigram, "Centigrams", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Decagram, "Decagrams", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Decigram, "Decigrams", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.EarthMass, "EarthMasses", new BaseUnits(mass: MassUnit.EarthMass), "Mass"), + new UnitInfo(MassUnit.Femtogram, "Femtograms", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Grain, "Grains", new BaseUnits(mass: MassUnit.Grain), "Mass"), + new UnitInfo(MassUnit.Gram, "Grams", new BaseUnits(mass: MassUnit.Gram), "Mass"), + new UnitInfo(MassUnit.Hectogram, "Hectograms", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Kilogram, "Kilograms", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Kilopound, "Kilopounds", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Kilotonne, "Kilotonnes", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.LongHundredweight, "LongHundredweight", new BaseUnits(mass: MassUnit.LongHundredweight), "Mass"), + new UnitInfo(MassUnit.LongTon, "LongTons", new BaseUnits(mass: MassUnit.LongTon), "Mass"), + new UnitInfo(MassUnit.Megapound, "Megapounds", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Megatonne, "Megatonnes", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Microgram, "Micrograms", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Milligram, "Milligrams", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Nanogram, "Nanograms", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Ounce, "Ounces", new BaseUnits(mass: MassUnit.Ounce), "Mass"), + new UnitInfo(MassUnit.Picogram, "Picograms", BaseUnits.Undefined, "Mass"), + new UnitInfo(MassUnit.Pound, "Pounds", new BaseUnits(mass: MassUnit.Pound), "Mass"), + new UnitInfo(MassUnit.ShortHundredweight, "ShortHundredweight", new BaseUnits(mass: MassUnit.ShortHundredweight), "Mass"), + new UnitInfo(MassUnit.ShortTon, "ShortTons", new BaseUnits(mass: MassUnit.ShortTon), "Mass"), + new UnitInfo(MassUnit.Slug, "Slugs", new BaseUnits(mass: MassUnit.Slug), "Mass"), + new UnitInfo(MassUnit.SolarMass, "SolarMasses", new BaseUnits(mass: MassUnit.SolarMass), "Mass"), + new UnitInfo(MassUnit.Stone, "Stone", new BaseUnits(mass: MassUnit.Stone), "Mass"), + new UnitInfo(MassUnit.Tonne, "Tonnes", new BaseUnits(mass: MassUnit.Tonne), "Mass"), }, BaseUnit, Zero, BaseDimensions); @@ -400,76 +400,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MassUnit.Kilogram, MassUnit.Tonne, quantity => quantity.ToUnit(MassUnit.Tonne)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Centigram, new CultureInfo("en-US"), false, true, new string[]{"cg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Centigram, new CultureInfo("ru-RU"), false, true, new string[]{"сг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Centigram, new CultureInfo("zh-CN"), false, true, new string[]{"厘克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Decagram, new CultureInfo("en-US"), false, true, new string[]{"dag"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Decagram, new CultureInfo("ru-RU"), false, true, new string[]{"даг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Decagram, new CultureInfo("zh-CN"), false, true, new string[]{"十克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Decigram, new CultureInfo("en-US"), false, true, new string[]{"dg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Decigram, new CultureInfo("ru-RU"), false, true, new string[]{"дг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Decigram, new CultureInfo("zh-CN"), false, true, new string[]{"分克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.EarthMass, new CultureInfo("en-US"), false, true, new string[]{"em"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Femtogram, new CultureInfo("en-US"), false, true, new string[]{"fg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Femtogram, new CultureInfo("ru-RU"), false, true, new string[]{"фг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Femtogram, new CultureInfo("zh-CN"), false, true, new string[]{"飞克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Grain, new CultureInfo("en-US"), false, true, new string[]{"gr"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Gram, new CultureInfo("en-US"), false, true, new string[]{"g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Gram, new CultureInfo("ru-RU"), false, true, new string[]{"г"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Gram, new CultureInfo("zh-CN"), false, true, new string[]{"克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Hectogram, new CultureInfo("en-US"), false, true, new string[]{"hg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Hectogram, new CultureInfo("ru-RU"), false, true, new string[]{"гг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Hectogram, new CultureInfo("zh-CN"), false, true, new string[]{"百克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilogram, new CultureInfo("en-US"), false, true, new string[]{"kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilogram, new CultureInfo("ru-RU"), false, true, new string[]{"кг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilogram, new CultureInfo("zh-CN"), false, true, new string[]{"千克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilopound, new CultureInfo("en-US"), false, true, new string[]{"klb", "klbs", "klbm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilopound, new CultureInfo("ru-RU"), false, true, new string[]{"кфунт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilopound, new CultureInfo("zh-CN"), false, true, new string[]{"千磅"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilotonne, new CultureInfo("en-US"), false, true, new string[]{"kt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilotonne, new CultureInfo("ru-RU"), false, true, new string[]{"кт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Kilotonne, new CultureInfo("zh-CN"), false, true, new string[]{"千吨"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.LongHundredweight, new CultureInfo("en-US"), false, true, new string[]{"cwt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.LongTon, new CultureInfo("en-US"), false, true, new string[]{"long tn"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.LongTon, new CultureInfo("ru-RU"), false, true, new string[]{"тонна большая"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.LongTon, new CultureInfo("zh-CN"), false, true, new string[]{"长吨"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Megapound, new CultureInfo("en-US"), false, true, new string[]{"Mlb", "Mlbs", "Mlbm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Megapound, new CultureInfo("ru-RU"), false, true, new string[]{"Мфунт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Megapound, new CultureInfo("zh-CN"), false, true, new string[]{"兆磅"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Megatonne, new CultureInfo("en-US"), false, true, new string[]{"Mt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Megatonne, new CultureInfo("ru-RU"), false, true, new string[]{"Мт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Megatonne, new CultureInfo("zh-CN"), false, true, new string[]{"兆吨"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Microgram, new CultureInfo("en-US"), false, true, new string[]{"µg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Microgram, new CultureInfo("ru-RU"), false, true, new string[]{"мкг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Microgram, new CultureInfo("zh-CN"), false, true, new string[]{"微克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Milligram, new CultureInfo("en-US"), false, true, new string[]{"mg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Milligram, new CultureInfo("ru-RU"), false, true, new string[]{"мг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Milligram, new CultureInfo("zh-CN"), false, true, new string[]{"毫克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Nanogram, new CultureInfo("en-US"), false, true, new string[]{"ng"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Nanogram, new CultureInfo("ru-RU"), false, true, new string[]{"нг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Nanogram, new CultureInfo("zh-CN"), false, true, new string[]{"纳克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Ounce, new CultureInfo("en-US"), false, true, new string[]{"oz"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Ounce, new CultureInfo("zh-CN"), false, true, new string[]{"盎司"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Picogram, new CultureInfo("en-US"), false, true, new string[]{"pg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Picogram, new CultureInfo("ru-RU"), false, true, new string[]{"пг"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Picogram, new CultureInfo("zh-CN"), false, true, new string[]{"皮克"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Pound, new CultureInfo("en-US"), false, true, new string[]{"lb", "lbs", "lbm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Pound, new CultureInfo("ru-RU"), false, true, new string[]{"фунт"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Pound, new CultureInfo("zh-CN"), false, true, new string[]{"磅"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.ShortHundredweight, new CultureInfo("en-US"), false, true, new string[]{"cwt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.ShortTon, new CultureInfo("en-US"), false, true, new string[]{"t (short)", "short tn", "ST"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.ShortTon, new CultureInfo("ru-RU"), false, true, new string[]{"тонна малая"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.ShortTon, new CultureInfo("zh-CN"), false, true, new string[]{"短吨"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Slug, new CultureInfo("en-US"), false, true, new string[]{"slug"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.SolarMass, new CultureInfo("en-US"), false, true, new string[]{"M☉", "M⊙"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Stone, new CultureInfo("en-US"), false, true, new string[]{"st"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Tonne, new CultureInfo("en-US"), false, true, new string[]{"t"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Tonne, new CultureInfo("ru-RU"), false, true, new string[]{"т"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassUnit.Tonne, new CultureInfo("zh-CN"), false, true, new string[]{"吨"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs index 67a832bf71..51edecb680 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs @@ -68,55 +68,55 @@ static MassConcentration() Info = new QuantityInfo("MassConcentration", new UnitInfo[] { - new UnitInfo(MassConcentrationUnit.CentigramPerDeciliter, "CentigramsPerDeciliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.CentigramPerLiter, "CentigramsPerLiter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.CentigramPerMicroliter, "CentigramsPerMicroliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.CentigramPerMilliliter, "CentigramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.DecigramPerDeciliter, "DecigramsPerDeciliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.DecigramPerLiter, "DecigramsPerLiter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.DecigramPerMicroliter, "DecigramsPerMicroliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.DecigramPerMilliliter, "DecigramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.GramPerCubicCentimeter, "GramsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram)), - new UnitInfo(MassConcentrationUnit.GramPerCubicMeter, "GramsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Gram)), - new UnitInfo(MassConcentrationUnit.GramPerCubicMillimeter, "GramsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Gram)), - new UnitInfo(MassConcentrationUnit.GramPerDeciliter, "GramsPerDeciliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.GramPerLiter, "GramsPerLiter", new BaseUnits(length: LengthUnit.Decimeter, mass: MassUnit.Gram)), - new UnitInfo(MassConcentrationUnit.GramPerMicroliter, "GramsPerMicroliter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram)), - new UnitInfo(MassConcentrationUnit.GramPerMilliliter, "GramsPerMilliliter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram)), - new UnitInfo(MassConcentrationUnit.KilogramPerCubicCentimeter, "KilogramsPerCubicCentimeter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.KilogramPerCubicMeter, "KilogramsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.KilogramPerCubicMillimeter, "KilogramsPerCubicMillimeter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.KilogramPerLiter, "KilogramsPerLiter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.KilopoundPerCubicFoot, "KilopoundsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.KilopoundPerCubicInch, "KilopoundsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MicrogramPerCubicMeter, "MicrogramsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MicrogramPerDeciliter, "MicrogramsPerDeciliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MicrogramPerLiter, "MicrogramsPerLiter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MicrogramPerMicroliter, "MicrogramsPerMicroliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MicrogramPerMilliliter, "MicrogramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MilligramPerCubicMeter, "MilligramsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MilligramPerDeciliter, "MilligramsPerDeciliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MilligramPerLiter, "MilligramsPerLiter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MilligramPerMicroliter, "MilligramsPerMicroliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.MilligramPerMilliliter, "MilligramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.NanogramPerDeciliter, "NanogramsPerDeciliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.NanogramPerLiter, "NanogramsPerLiter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.NanogramPerMicroliter, "NanogramsPerMicroliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.NanogramPerMilliliter, "NanogramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.OuncePerImperialGallon, "OuncesPerImperialGallon", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.OuncePerUSGallon, "OuncesPerUSGallon", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.PicogramPerDeciliter, "PicogramsPerDeciliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.PicogramPerLiter, "PicogramsPerLiter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.PicogramPerMicroliter, "PicogramsPerMicroliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.PicogramPerMilliliter, "PicogramsPerMilliliter", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.PoundPerCubicFoot, "PoundsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Pound)), - new UnitInfo(MassConcentrationUnit.PoundPerCubicInch, "PoundsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Pound)), - new UnitInfo(MassConcentrationUnit.PoundPerImperialGallon, "PoundsPerImperialGallon", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.PoundPerUSGallon, "PoundsPerUSGallon", BaseUnits.Undefined), - new UnitInfo(MassConcentrationUnit.SlugPerCubicFoot, "SlugsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Slug)), - new UnitInfo(MassConcentrationUnit.TonnePerCubicCentimeter, "TonnesPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Tonne)), - new UnitInfo(MassConcentrationUnit.TonnePerCubicMeter, "TonnesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Tonne)), - new UnitInfo(MassConcentrationUnit.TonnePerCubicMillimeter, "TonnesPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Tonne)), + new UnitInfo(MassConcentrationUnit.CentigramPerDeciliter, "CentigramsPerDeciliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.CentigramPerLiter, "CentigramsPerLiter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.CentigramPerMicroliter, "CentigramsPerMicroliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.CentigramPerMilliliter, "CentigramsPerMilliliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.DecigramPerDeciliter, "DecigramsPerDeciliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.DecigramPerLiter, "DecigramsPerLiter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.DecigramPerMicroliter, "DecigramsPerMicroliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.DecigramPerMilliliter, "DecigramsPerMilliliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.GramPerCubicCentimeter, "GramsPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.GramPerCubicMeter, "GramsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Gram), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.GramPerCubicMillimeter, "GramsPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Gram), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.GramPerDeciliter, "GramsPerDeciliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.GramPerLiter, "GramsPerLiter", new BaseUnits(length: LengthUnit.Decimeter, mass: MassUnit.Gram), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.GramPerMicroliter, "GramsPerMicroliter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.GramPerMilliliter, "GramsPerMilliliter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Gram), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.KilogramPerCubicCentimeter, "KilogramsPerCubicCentimeter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.KilogramPerCubicMeter, "KilogramsPerCubicMeter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.KilogramPerCubicMillimeter, "KilogramsPerCubicMillimeter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.KilogramPerLiter, "KilogramsPerLiter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.KilopoundPerCubicFoot, "KilopoundsPerCubicFoot", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.KilopoundPerCubicInch, "KilopoundsPerCubicInch", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MicrogramPerCubicMeter, "MicrogramsPerCubicMeter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MicrogramPerDeciliter, "MicrogramsPerDeciliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MicrogramPerLiter, "MicrogramsPerLiter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MicrogramPerMicroliter, "MicrogramsPerMicroliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MicrogramPerMilliliter, "MicrogramsPerMilliliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MilligramPerCubicMeter, "MilligramsPerCubicMeter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MilligramPerDeciliter, "MilligramsPerDeciliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MilligramPerLiter, "MilligramsPerLiter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MilligramPerMicroliter, "MilligramsPerMicroliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.MilligramPerMilliliter, "MilligramsPerMilliliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.NanogramPerDeciliter, "NanogramsPerDeciliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.NanogramPerLiter, "NanogramsPerLiter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.NanogramPerMicroliter, "NanogramsPerMicroliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.NanogramPerMilliliter, "NanogramsPerMilliliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.OuncePerImperialGallon, "OuncesPerImperialGallon", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.OuncePerUSGallon, "OuncesPerUSGallon", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PicogramPerDeciliter, "PicogramsPerDeciliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PicogramPerLiter, "PicogramsPerLiter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PicogramPerMicroliter, "PicogramsPerMicroliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PicogramPerMilliliter, "PicogramsPerMilliliter", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PoundPerCubicFoot, "PoundsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Pound), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PoundPerCubicInch, "PoundsPerCubicInch", new BaseUnits(length: LengthUnit.Inch, mass: MassUnit.Pound), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PoundPerImperialGallon, "PoundsPerImperialGallon", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.PoundPerUSGallon, "PoundsPerUSGallon", BaseUnits.Undefined, "MassConcentration"), + new UnitInfo(MassConcentrationUnit.SlugPerCubicFoot, "SlugsPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, mass: MassUnit.Slug), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.TonnePerCubicCentimeter, "TonnesPerCubicCentimeter", new BaseUnits(length: LengthUnit.Centimeter, mass: MassUnit.Tonne), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.TonnePerCubicMeter, "TonnesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Tonne), "MassConcentration"), + new UnitInfo(MassConcentrationUnit.TonnePerCubicMillimeter, "TonnesPerCubicMillimeter", new BaseUnits(length: LengthUnit.Millimeter, mass: MassUnit.Tonne), "MassConcentration"), }, BaseUnit, Zero, BaseDimensions); @@ -579,63 +579,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MassConcentrationUnit.KilogramPerCubicMeter, MassConcentrationUnit.TonnePerCubicMillimeter, quantity => quantity.ToUnit(MassConcentrationUnit.TonnePerCubicMillimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.CentigramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"cg/dL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.CentigramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"cg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.CentigramPerMicroliter, new CultureInfo("en-US"), false, true, new string[]{"cg/μL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.CentigramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"cg/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.DecigramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"dg/dL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.DecigramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"dg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.DecigramPerMicroliter, new CultureInfo("en-US"), false, true, new string[]{"dg/μL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.DecigramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"dg/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"g/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"g/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"г/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"g/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"g/dL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"g/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerMicroliter, new CultureInfo("en-US"), false, true, new string[]{"g/μL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.GramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"g/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.KilogramPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kg/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.KilogramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kg/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.KilogramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"кг/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.KilogramPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kg/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.KilogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"kg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.KilopoundPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"kip/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.KilopoundPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"kip/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MicrogramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"µg/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MicrogramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"мкг/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MicrogramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"µg/dL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MicrogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"µg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MicrogramPerMicroliter, new CultureInfo("en-US"), false, true, new string[]{"µg/μL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MicrogramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"µg/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MilligramPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"mg/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MilligramPerCubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"мг/м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MilligramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"mg/dL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MilligramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"mg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MilligramPerMicroliter, new CultureInfo("en-US"), false, true, new string[]{"mg/μL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.MilligramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"mg/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.NanogramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"ng/dL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.NanogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"ng/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.NanogramPerMicroliter, new CultureInfo("en-US"), false, true, new string[]{"ng/μL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.NanogramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"ng/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.OuncePerImperialGallon, new CultureInfo("en-US"), false, true, new string[]{"oz/gal (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.OuncePerUSGallon, new CultureInfo("en-US"), false, true, new string[]{"oz/gal (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PicogramPerDeciliter, new CultureInfo("en-US"), false, true, new string[]{"pg/dL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PicogramPerLiter, new CultureInfo("en-US"), false, true, new string[]{"pg/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PicogramPerMicroliter, new CultureInfo("en-US"), false, true, new string[]{"pg/μL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PicogramPerMilliliter, new CultureInfo("en-US"), false, true, new string[]{"pg/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PoundPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"lb/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PoundPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"lb/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PoundPerImperialGallon, new CultureInfo("en-US"), false, true, new string[]{"ppg (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.PoundPerUSGallon, new CultureInfo("en-US"), false, true, new string[]{"ppg (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.SlugPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"slug/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.TonnePerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"t/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.TonnePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"t/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassConcentrationUnit.TonnePerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"t/mm³"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs index ed74027626..5e549a4733 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs @@ -65,39 +65,39 @@ static MassFlow() Info = new QuantityInfo("MassFlow", new UnitInfo[] { - new UnitInfo(MassFlowUnit.CentigramPerDay, "CentigramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.CentigramPerSecond, "CentigramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.DecagramPerDay, "DecagramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.DecagramPerSecond, "DecagramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.DecigramPerDay, "DecigramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.DecigramPerSecond, "DecigramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.GramPerDay, "GramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.GramPerHour, "GramsPerHour", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.GramPerSecond, "GramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.HectogramPerDay, "HectogramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.HectogramPerSecond, "HectogramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.KilogramPerDay, "KilogramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.KilogramPerHour, "KilogramsPerHour", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.KilogramPerMinute, "KilogramsPerMinute", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.KilogramPerSecond, "KilogramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MegagramPerDay, "MegagramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MegapoundPerDay, "MegapoundsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MegapoundPerHour, "MegapoundsPerHour", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MegapoundPerMinute, "MegapoundsPerMinute", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MegapoundPerSecond, "MegapoundsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MicrogramPerDay, "MicrogramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MicrogramPerSecond, "MicrogramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MilligramPerDay, "MilligramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.MilligramPerSecond, "MilligramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.NanogramPerDay, "NanogramsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.NanogramPerSecond, "NanogramsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.PoundPerDay, "PoundsPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.PoundPerHour, "PoundsPerHour", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.PoundPerMinute, "PoundsPerMinute", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.PoundPerSecond, "PoundsPerSecond", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.ShortTonPerHour, "ShortTonsPerHour", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.TonnePerDay, "TonnesPerDay", BaseUnits.Undefined), - new UnitInfo(MassFlowUnit.TonnePerHour, "TonnesPerHour", BaseUnits.Undefined), + new UnitInfo(MassFlowUnit.CentigramPerDay, "CentigramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.CentigramPerSecond, "CentigramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.DecagramPerDay, "DecagramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.DecagramPerSecond, "DecagramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.DecigramPerDay, "DecigramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.DecigramPerSecond, "DecigramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.GramPerDay, "GramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.GramPerHour, "GramsPerHour", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.GramPerSecond, "GramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.HectogramPerDay, "HectogramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.HectogramPerSecond, "HectogramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.KilogramPerDay, "KilogramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.KilogramPerHour, "KilogramsPerHour", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.KilogramPerMinute, "KilogramsPerMinute", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.KilogramPerSecond, "KilogramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MegagramPerDay, "MegagramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MegapoundPerDay, "MegapoundsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MegapoundPerHour, "MegapoundsPerHour", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MegapoundPerMinute, "MegapoundsPerMinute", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MegapoundPerSecond, "MegapoundsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MicrogramPerDay, "MicrogramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MicrogramPerSecond, "MicrogramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MilligramPerDay, "MilligramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.MilligramPerSecond, "MilligramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.NanogramPerDay, "NanogramsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.NanogramPerSecond, "NanogramsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.PoundPerDay, "PoundsPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.PoundPerHour, "PoundsPerHour", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.PoundPerMinute, "PoundsPerMinute", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.PoundPerSecond, "PoundsPerSecond", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.ShortTonPerHour, "ShortTonsPerHour", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.TonnePerDay, "TonnesPerDay", BaseUnits.Undefined, "MassFlow"), + new UnitInfo(MassFlowUnit.TonnePerHour, "TonnesPerHour", BaseUnits.Undefined, "MassFlow"), }, BaseUnit, Zero, BaseDimensions); @@ -448,45 +448,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MassFlowUnit.GramPerSecond, MassFlowUnit.TonnePerHour, quantity => quantity.ToUnit(MassFlowUnit.TonnePerHour)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.CentigramPerDay, new CultureInfo("en-US"), false, true, new string[]{"cg/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.CentigramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"cg/s", "cg/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.DecagramPerDay, new CultureInfo("en-US"), false, true, new string[]{"dag/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.DecagramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"dag/s", "dag/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.DecigramPerDay, new CultureInfo("en-US"), false, true, new string[]{"dg/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.DecigramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"dg/s", "dg/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.GramPerDay, new CultureInfo("en-US"), false, true, new string[]{"g/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.GramPerHour, new CultureInfo("en-US"), false, true, new string[]{"g/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.GramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"g/s", "g/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.HectogramPerDay, new CultureInfo("en-US"), false, true, new string[]{"hg/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.HectogramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"hg/s", "hg/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.KilogramPerDay, new CultureInfo("en-US"), false, true, new string[]{"kg/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.KilogramPerHour, new CultureInfo("en-US"), false, true, new string[]{"kg/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.KilogramPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"кг/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.KilogramPerMinute, new CultureInfo("en-US"), false, true, new string[]{"kg/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.KilogramPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"кг/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.KilogramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kg/s", "kg/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MegagramPerDay, new CultureInfo("en-US"), false, true, new string[]{"Mg/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MegapoundPerDay, new CultureInfo("en-US"), false, true, new string[]{"Mlb/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MegapoundPerHour, new CultureInfo("en-US"), false, true, new string[]{"Mlb/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MegapoundPerMinute, new CultureInfo("en-US"), false, true, new string[]{"Mlb/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MegapoundPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Mlb/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MicrogramPerDay, new CultureInfo("en-US"), false, true, new string[]{"µg/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MicrogramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"µg/s", "µg/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MilligramPerDay, new CultureInfo("en-US"), false, true, new string[]{"mg/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.MilligramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mg/s", "mg/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.NanogramPerDay, new CultureInfo("en-US"), false, true, new string[]{"ng/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.NanogramPerSecond, new CultureInfo("en-US"), false, true, new string[]{"ng/s", "ng/S"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.PoundPerDay, new CultureInfo("en-US"), false, true, new string[]{"lb/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.PoundPerHour, new CultureInfo("en-US"), false, true, new string[]{"lb/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.PoundPerMinute, new CultureInfo("en-US"), false, true, new string[]{"lb/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.PoundPerSecond, new CultureInfo("en-US"), false, true, new string[]{"lb/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.ShortTonPerHour, new CultureInfo("en-US"), false, true, new string[]{"short tn/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.TonnePerDay, new CultureInfo("en-US"), false, true, new string[]{"t/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFlowUnit.TonnePerHour, new CultureInfo("en-US"), false, true, new string[]{"t/h"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs index 35cbf6ad04..7e2d2238a2 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs @@ -65,18 +65,18 @@ static MassFlux() Info = new QuantityInfo("MassFlux", new UnitInfo[] { - new UnitInfo(MassFluxUnit.GramPerHourPerSquareCentimeter, "GramsPerHourPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.GramPerHourPerSquareMeter, "GramsPerHourPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.GramPerHourPerSquareMillimeter, "GramsPerHourPerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.GramPerSecondPerSquareCentimeter, "GramsPerSecondPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.GramPerSecondPerSquareMeter, "GramsPerSecondPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.GramPerSecondPerSquareMillimeter, "GramsPerSecondPerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.KilogramPerHourPerSquareCentimeter, "KilogramsPerHourPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.KilogramPerHourPerSquareMeter, "KilogramsPerHourPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.KilogramPerHourPerSquareMillimeter, "KilogramsPerHourPerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.KilogramPerSecondPerSquareCentimeter, "KilogramsPerSecondPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.KilogramPerSecondPerSquareMeter, "KilogramsPerSecondPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(MassFluxUnit.KilogramPerSecondPerSquareMillimeter, "KilogramsPerSecondPerSquareMillimeter", BaseUnits.Undefined), + new UnitInfo(MassFluxUnit.GramPerHourPerSquareCentimeter, "GramsPerHourPerSquareCentimeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.GramPerHourPerSquareMeter, "GramsPerHourPerSquareMeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.GramPerHourPerSquareMillimeter, "GramsPerHourPerSquareMillimeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.GramPerSecondPerSquareCentimeter, "GramsPerSecondPerSquareCentimeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.GramPerSecondPerSquareMeter, "GramsPerSecondPerSquareMeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.GramPerSecondPerSquareMillimeter, "GramsPerSecondPerSquareMillimeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.KilogramPerHourPerSquareCentimeter, "KilogramsPerHourPerSquareCentimeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.KilogramPerHourPerSquareMeter, "KilogramsPerHourPerSquareMeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.KilogramPerHourPerSquareMillimeter, "KilogramsPerHourPerSquareMillimeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.KilogramPerSecondPerSquareCentimeter, "KilogramsPerSecondPerSquareCentimeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.KilogramPerSecondPerSquareMeter, "KilogramsPerSecondPerSquareMeter", BaseUnits.Undefined, "MassFlux"), + new UnitInfo(MassFluxUnit.KilogramPerSecondPerSquareMillimeter, "KilogramsPerSecondPerSquareMillimeter", BaseUnits.Undefined, "MassFlux"), }, BaseUnit, Zero, BaseDimensions); @@ -280,22 +280,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MassFluxUnit.KilogramPerSecondPerSquareMeter, MassFluxUnit.KilogramPerSecondPerSquareMillimeter, quantity => quantity.ToUnit(MassFluxUnit.KilogramPerSecondPerSquareMillimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.GramPerHourPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"g·h⁻¹·cm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.GramPerHourPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"g·h⁻¹·m⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.GramPerHourPerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"g·h⁻¹·mm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.GramPerSecondPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"g·s⁻¹·cm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.GramPerSecondPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"g·s⁻¹·m⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.GramPerSecondPerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"g·s⁻¹·mm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.KilogramPerHourPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kg·h⁻¹·cm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.KilogramPerHourPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kg·h⁻¹·m⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.KilogramPerHourPerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kg·h⁻¹·mm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.KilogramPerSecondPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kg·s⁻¹·cm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.KilogramPerSecondPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kg·s⁻¹·m⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFluxUnit.KilogramPerSecondPerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kg·s⁻¹·mm⁻²"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs index ea44af973b..aefdabb003 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs @@ -68,30 +68,30 @@ static MassFraction() Info = new QuantityInfo("MassFraction", new UnitInfo[] { - new UnitInfo(MassFractionUnit.CentigramPerGram, "CentigramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.CentigramPerKilogram, "CentigramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.DecagramPerGram, "DecagramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.DecagramPerKilogram, "DecagramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.DecigramPerGram, "DecigramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.DecigramPerKilogram, "DecigramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.DecimalFraction, "DecimalFractions", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.GramPerGram, "GramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.GramPerKilogram, "GramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.HectogramPerGram, "HectogramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.HectogramPerKilogram, "HectogramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.KilogramPerGram, "KilogramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.KilogramPerKilogram, "KilogramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.MicrogramPerGram, "MicrogramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.MicrogramPerKilogram, "MicrogramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.MilligramPerGram, "MilligramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.MilligramPerKilogram, "MilligramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.NanogramPerGram, "NanogramsPerGram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.NanogramPerKilogram, "NanogramsPerKilogram", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.PartPerBillion, "PartsPerBillion", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.PartPerMillion, "PartsPerMillion", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.PartPerThousand, "PartsPerThousand", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.PartPerTrillion, "PartsPerTrillion", BaseUnits.Undefined), - new UnitInfo(MassFractionUnit.Percent, "Percent", BaseUnits.Undefined), + new UnitInfo(MassFractionUnit.CentigramPerGram, "CentigramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.CentigramPerKilogram, "CentigramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.DecagramPerGram, "DecagramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.DecagramPerKilogram, "DecagramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.DecigramPerGram, "DecigramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.DecigramPerKilogram, "DecigramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.DecimalFraction, "DecimalFractions", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.GramPerGram, "GramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.GramPerKilogram, "GramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.HectogramPerGram, "HectogramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.HectogramPerKilogram, "HectogramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.KilogramPerGram, "KilogramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.KilogramPerKilogram, "KilogramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.MicrogramPerGram, "MicrogramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.MicrogramPerKilogram, "MicrogramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.MilligramPerGram, "MilligramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.MilligramPerKilogram, "MilligramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.NanogramPerGram, "NanogramsPerGram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.NanogramPerKilogram, "NanogramsPerKilogram", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.PartPerBillion, "PartsPerBillion", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.PartPerMillion, "PartsPerMillion", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.PartPerThousand, "PartsPerThousand", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.PartPerTrillion, "PartsPerTrillion", BaseUnits.Undefined, "MassFraction"), + new UnitInfo(MassFractionUnit.Percent, "Percent", BaseUnits.Undefined, "MassFraction"), }, BaseUnit, Zero, BaseDimensions); @@ -379,34 +379,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MassFractionUnit.DecimalFraction, MassFractionUnit.Percent, quantity => quantity.ToUnit(MassFractionUnit.Percent)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.CentigramPerGram, new CultureInfo("en-US"), false, true, new string[]{"cg/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.CentigramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"cg/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.DecagramPerGram, new CultureInfo("en-US"), false, true, new string[]{"dag/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.DecagramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"dag/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.DecigramPerGram, new CultureInfo("en-US"), false, true, new string[]{"dg/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.DecigramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"dg/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.DecimalFraction, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.GramPerGram, new CultureInfo("en-US"), false, true, new string[]{"g/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.GramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"g/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.HectogramPerGram, new CultureInfo("en-US"), false, true, new string[]{"hg/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.HectogramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"hg/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.KilogramPerGram, new CultureInfo("en-US"), false, true, new string[]{"kg/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.KilogramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"kg/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.MicrogramPerGram, new CultureInfo("en-US"), false, true, new string[]{"µg/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.MicrogramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"µg/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.MilligramPerGram, new CultureInfo("en-US"), false, true, new string[]{"mg/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.MilligramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"mg/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.NanogramPerGram, new CultureInfo("en-US"), false, true, new string[]{"ng/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.NanogramPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"ng/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.PartPerBillion, new CultureInfo("en-US"), false, true, new string[]{"ppb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.PartPerMillion, new CultureInfo("en-US"), false, true, new string[]{"ppm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.PartPerThousand, new CultureInfo("en-US"), false, true, new string[]{"‰"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.PartPerTrillion, new CultureInfo("en-US"), false, true, new string[]{"ppt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassFractionUnit.Percent, new CultureInfo("en-US"), false, true, new string[]{"%", "% (w/w)"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs index 49442ddc3e..83719eb920 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs @@ -65,34 +65,34 @@ static MassMomentOfInertia() Info = new QuantityInfo("MassMomentOfInertia", new UnitInfo[] { - new UnitInfo(MassMomentOfInertiaUnit.GramSquareCentimeter, "GramSquareCentimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.GramSquareDecimeter, "GramSquareDecimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.GramSquareMeter, "GramSquareMeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.GramSquareMillimeter, "GramSquareMillimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareCentimeter, "KilogramSquareCentimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareDecimeter, "KilogramSquareDecimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareMeter, "KilogramSquareMeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareMillimeter, "KilogramSquareMillimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareCentimeter, "KilotonneSquareCentimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareDecimeter, "KilotonneSquareDecimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareMeter, "KilotonneSquareMeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareMilimeter, "KilotonneSquareMilimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareCentimeter, "MegatonneSquareCentimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareDecimeter, "MegatonneSquareDecimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareMeter, "MegatonneSquareMeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareMilimeter, "MegatonneSquareMilimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareCentimeter, "MilligramSquareCentimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareDecimeter, "MilligramSquareDecimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareMeter, "MilligramSquareMeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareMillimeter, "MilligramSquareMillimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.PoundSquareFoot, "PoundSquareFeet", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.PoundSquareInch, "PoundSquareInches", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.SlugSquareFoot, "SlugSquareFeet", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.SlugSquareInch, "SlugSquareInches", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.TonneSquareCentimeter, "TonneSquareCentimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.TonneSquareDecimeter, "TonneSquareDecimeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.TonneSquareMeter, "TonneSquareMeters", BaseUnits.Undefined), - new UnitInfo(MassMomentOfInertiaUnit.TonneSquareMilimeter, "TonneSquareMilimeters", BaseUnits.Undefined), + new UnitInfo(MassMomentOfInertiaUnit.GramSquareCentimeter, "GramSquareCentimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.GramSquareDecimeter, "GramSquareDecimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.GramSquareMeter, "GramSquareMeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.GramSquareMillimeter, "GramSquareMillimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareCentimeter, "KilogramSquareCentimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareDecimeter, "KilogramSquareDecimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareMeter, "KilogramSquareMeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilogramSquareMillimeter, "KilogramSquareMillimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareCentimeter, "KilotonneSquareCentimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareDecimeter, "KilotonneSquareDecimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareMeter, "KilotonneSquareMeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.KilotonneSquareMilimeter, "KilotonneSquareMilimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareCentimeter, "MegatonneSquareCentimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareDecimeter, "MegatonneSquareDecimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareMeter, "MegatonneSquareMeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MegatonneSquareMilimeter, "MegatonneSquareMilimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareCentimeter, "MilligramSquareCentimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareDecimeter, "MilligramSquareDecimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareMeter, "MilligramSquareMeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.MilligramSquareMillimeter, "MilligramSquareMillimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.PoundSquareFoot, "PoundSquareFeet", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.PoundSquareInch, "PoundSquareInches", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.SlugSquareFoot, "SlugSquareFeet", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.SlugSquareInch, "SlugSquareInches", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.TonneSquareCentimeter, "TonneSquareCentimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.TonneSquareDecimeter, "TonneSquareDecimeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.TonneSquareMeter, "TonneSquareMeters", BaseUnits.Undefined, "MassMomentOfInertia"), + new UnitInfo(MassMomentOfInertiaUnit.TonneSquareMilimeter, "TonneSquareMilimeters", BaseUnits.Undefined, "MassMomentOfInertia"), }, BaseUnit, Zero, BaseDimensions); @@ -408,38 +408,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MassMomentOfInertiaUnit.KilogramSquareMeter, MassMomentOfInertiaUnit.TonneSquareMilimeter, quantity => quantity.ToUnit(MassMomentOfInertiaUnit.TonneSquareMilimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.GramSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"g·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.GramSquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"g·dm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.GramSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"g·m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.GramSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"g·mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilogramSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kg·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilogramSquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"kg·dm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilogramSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kg·m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilogramSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kg·mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilotonneSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kt·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilotonneSquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"kt·dm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilotonneSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kt·m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.KilotonneSquareMilimeter, new CultureInfo("en-US"), false, true, new string[]{"kt·mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MegatonneSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"Mt·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MegatonneSquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"Mt·dm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MegatonneSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"Mt·m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MegatonneSquareMilimeter, new CultureInfo("en-US"), false, true, new string[]{"Mt·mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MilligramSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"mg·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MilligramSquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"mg·dm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MilligramSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"mg·m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.MilligramSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mg·mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.PoundSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"lb·ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.PoundSquareInch, new CultureInfo("en-US"), false, true, new string[]{"lb·in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.SlugSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"slug·ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.SlugSquareInch, new CultureInfo("en-US"), false, true, new string[]{"slug·in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.TonneSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"t·cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.TonneSquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"t·dm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.TonneSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"t·m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MassMomentOfInertiaUnit.TonneSquareMilimeter, new CultureInfo("en-US"), false, true, new string[]{"t·mm²"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs index 0ccc2dfb10..6c5de0b2da 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs @@ -65,9 +65,9 @@ static MolarEnergy() Info = new QuantityInfo("MolarEnergy", new UnitInfo[] { - new UnitInfo(MolarEnergyUnit.JoulePerMole, "JoulesPerMole", BaseUnits.Undefined), - new UnitInfo(MolarEnergyUnit.KilojoulePerMole, "KilojoulesPerMole", BaseUnits.Undefined), - new UnitInfo(MolarEnergyUnit.MegajoulePerMole, "MegajoulesPerMole", BaseUnits.Undefined), + new UnitInfo(MolarEnergyUnit.JoulePerMole, "JoulesPerMole", BaseUnits.Undefined, "MolarEnergy"), + new UnitInfo(MolarEnergyUnit.KilojoulePerMole, "KilojoulesPerMole", BaseUnits.Undefined, "MolarEnergy"), + new UnitInfo(MolarEnergyUnit.MegajoulePerMole, "MegajoulesPerMole", BaseUnits.Undefined, "MolarEnergy"), }, BaseUnit, Zero, BaseDimensions); @@ -208,13 +208,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MolarEnergyUnit.JoulePerMole, MolarEnergyUnit.MegajoulePerMole, quantity => quantity.ToUnit(MolarEnergyUnit.MegajoulePerMole)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MolarEnergyUnit.JoulePerMole, new CultureInfo("en-US"), false, true, new string[]{"J/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarEnergyUnit.KilojoulePerMole, new CultureInfo("en-US"), false, true, new string[]{"kJ/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarEnergyUnit.MegajoulePerMole, new CultureInfo("en-US"), false, true, new string[]{"MJ/mol"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs index 71460a5bcd..68cc0802e7 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs @@ -65,9 +65,9 @@ static MolarEntropy() Info = new QuantityInfo("MolarEntropy", new UnitInfo[] { - new UnitInfo(MolarEntropyUnit.JoulePerMoleKelvin, "JoulesPerMoleKelvin", BaseUnits.Undefined), - new UnitInfo(MolarEntropyUnit.KilojoulePerMoleKelvin, "KilojoulesPerMoleKelvin", BaseUnits.Undefined), - new UnitInfo(MolarEntropyUnit.MegajoulePerMoleKelvin, "MegajoulesPerMoleKelvin", BaseUnits.Undefined), + new UnitInfo(MolarEntropyUnit.JoulePerMoleKelvin, "JoulesPerMoleKelvin", BaseUnits.Undefined, "MolarEntropy"), + new UnitInfo(MolarEntropyUnit.KilojoulePerMoleKelvin, "KilojoulesPerMoleKelvin", BaseUnits.Undefined, "MolarEntropy"), + new UnitInfo(MolarEntropyUnit.MegajoulePerMoleKelvin, "MegajoulesPerMoleKelvin", BaseUnits.Undefined, "MolarEntropy"), }, BaseUnit, Zero, BaseDimensions); @@ -208,13 +208,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MolarEntropyUnit.JoulePerMoleKelvin, MolarEntropyUnit.MegajoulePerMoleKelvin, quantity => quantity.ToUnit(MolarEntropyUnit.MegajoulePerMoleKelvin)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MolarEntropyUnit.JoulePerMoleKelvin, new CultureInfo("en-US"), false, true, new string[]{"J/(mol*K)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarEntropyUnit.KilojoulePerMoleKelvin, new CultureInfo("en-US"), false, true, new string[]{"kJ/(mol*K)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarEntropyUnit.MegajoulePerMoleKelvin, new CultureInfo("en-US"), false, true, new string[]{"MJ/(mol*K)"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs index d0ef8f0754..1b9c745610 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs @@ -65,15 +65,15 @@ static MolarFlow() Info = new QuantityInfo("MolarFlow", new UnitInfo[] { - new UnitInfo(MolarFlowUnit.KilomolePerHour, "KilomolesPerHour", BaseUnits.Undefined), - new UnitInfo(MolarFlowUnit.KilomolePerMinute, "KilomolesPerMinute", BaseUnits.Undefined), - new UnitInfo(MolarFlowUnit.KilomolePerSecond, "KilomolesPerSecond", BaseUnits.Undefined), - new UnitInfo(MolarFlowUnit.MolePerHour, "MolesPerHour", new BaseUnits(time: DurationUnit.Hour, amount: AmountOfSubstanceUnit.Mole)), - new UnitInfo(MolarFlowUnit.MolePerMinute, "MolesPerMinute", new BaseUnits(time: DurationUnit.Minute, amount: AmountOfSubstanceUnit.Mole)), - new UnitInfo(MolarFlowUnit.MolePerSecond, "MolesPerSecond", new BaseUnits(time: DurationUnit.Second, amount: AmountOfSubstanceUnit.Mole)), - new UnitInfo(MolarFlowUnit.PoundMolePerHour, "PoundMolesPerHour", new BaseUnits(time: DurationUnit.Hour, amount: AmountOfSubstanceUnit.PoundMole)), - new UnitInfo(MolarFlowUnit.PoundMolePerMinute, "PoundMolesPerMinute", new BaseUnits(time: DurationUnit.Minute, amount: AmountOfSubstanceUnit.PoundMole)), - new UnitInfo(MolarFlowUnit.PoundMolePerSecond, "PoundMolesPerSecond", new BaseUnits(time: DurationUnit.Second, amount: AmountOfSubstanceUnit.PoundMole)), + new UnitInfo(MolarFlowUnit.KilomolePerHour, "KilomolesPerHour", BaseUnits.Undefined, "MolarFlow"), + new UnitInfo(MolarFlowUnit.KilomolePerMinute, "KilomolesPerMinute", BaseUnits.Undefined, "MolarFlow"), + new UnitInfo(MolarFlowUnit.KilomolePerSecond, "KilomolesPerSecond", BaseUnits.Undefined, "MolarFlow"), + new UnitInfo(MolarFlowUnit.MolePerHour, "MolesPerHour", new BaseUnits(time: DurationUnit.Hour, amount: AmountOfSubstanceUnit.Mole), "MolarFlow"), + new UnitInfo(MolarFlowUnit.MolePerMinute, "MolesPerMinute", new BaseUnits(time: DurationUnit.Minute, amount: AmountOfSubstanceUnit.Mole), "MolarFlow"), + new UnitInfo(MolarFlowUnit.MolePerSecond, "MolesPerSecond", new BaseUnits(time: DurationUnit.Second, amount: AmountOfSubstanceUnit.Mole), "MolarFlow"), + new UnitInfo(MolarFlowUnit.PoundMolePerHour, "PoundMolesPerHour", new BaseUnits(time: DurationUnit.Hour, amount: AmountOfSubstanceUnit.PoundMole), "MolarFlow"), + new UnitInfo(MolarFlowUnit.PoundMolePerMinute, "PoundMolesPerMinute", new BaseUnits(time: DurationUnit.Minute, amount: AmountOfSubstanceUnit.PoundMole), "MolarFlow"), + new UnitInfo(MolarFlowUnit.PoundMolePerSecond, "PoundMolesPerSecond", new BaseUnits(time: DurationUnit.Second, amount: AmountOfSubstanceUnit.PoundMole), "MolarFlow"), }, BaseUnit, Zero, BaseDimensions); @@ -256,19 +256,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MolarFlowUnit.MolePerSecond, MolarFlowUnit.PoundMolePerSecond, quantity => quantity.ToUnit(MolarFlowUnit.PoundMolePerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.KilomolePerHour, new CultureInfo("en-US"), false, true, new string[]{"kkmol/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.KilomolePerMinute, new CultureInfo("en-US"), false, true, new string[]{"kmol/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.KilomolePerSecond, new CultureInfo("en-US"), false, true, new string[]{"kmol/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.MolePerHour, new CultureInfo("en-US"), false, true, new string[]{"kmol/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.MolePerMinute, new CultureInfo("en-US"), false, true, new string[]{"mol/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.MolePerSecond, new CultureInfo("en-US"), false, true, new string[]{"mol/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.PoundMolePerHour, new CultureInfo("en-US"), false, true, new string[]{"lbmol/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.PoundMolePerMinute, new CultureInfo("en-US"), false, true, new string[]{"lbmol/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarFlowUnit.PoundMolePerSecond, new CultureInfo("en-US"), false, true, new string[]{"lbmol/s"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs index caabb8d00c..ad069accd1 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs @@ -65,19 +65,19 @@ static MolarMass() Info = new QuantityInfo("MolarMass", new UnitInfo[] { - new UnitInfo(MolarMassUnit.CentigramPerMole, "CentigramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.DecagramPerMole, "DecagramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.DecigramPerMole, "DecigramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.GramPerMole, "GramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.HectogramPerMole, "HectogramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.KilogramPerKilomole, "KilogramsPerKilomole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.KilogramPerMole, "KilogramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.KilopoundPerMole, "KilopoundsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.MegapoundPerMole, "MegapoundsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.MicrogramPerMole, "MicrogramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.MilligramPerMole, "MilligramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.NanogramPerMole, "NanogramsPerMole", BaseUnits.Undefined), - new UnitInfo(MolarMassUnit.PoundPerMole, "PoundsPerMole", BaseUnits.Undefined), + new UnitInfo(MolarMassUnit.CentigramPerMole, "CentigramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.DecagramPerMole, "DecagramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.DecigramPerMole, "DecigramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.GramPerMole, "GramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.HectogramPerMole, "HectogramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.KilogramPerKilomole, "KilogramsPerKilomole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.KilogramPerMole, "KilogramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.KilopoundPerMole, "KilopoundsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.MegapoundPerMole, "MegapoundsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.MicrogramPerMole, "MicrogramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.MilligramPerMole, "MilligramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.NanogramPerMole, "NanogramsPerMole", BaseUnits.Undefined, "MolarMass"), + new UnitInfo(MolarMassUnit.PoundPerMole, "PoundsPerMole", BaseUnits.Undefined, "MolarMass"), }, BaseUnit, Zero, BaseDimensions); @@ -288,35 +288,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MolarMassUnit.KilogramPerMole, MolarMassUnit.PoundPerMole, quantity => quantity.ToUnit(MolarMassUnit.PoundPerMole)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.CentigramPerMole, new CultureInfo("en-US"), false, true, new string[]{"cg/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.CentigramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"сг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.DecagramPerMole, new CultureInfo("en-US"), false, true, new string[]{"dag/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.DecagramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"даг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.DecigramPerMole, new CultureInfo("en-US"), false, true, new string[]{"dg/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.DecigramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"дг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.GramPerMole, new CultureInfo("en-US"), false, true, new string[]{"g/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.GramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"г/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.HectogramPerMole, new CultureInfo("en-US"), false, true, new string[]{"hg/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.HectogramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"гг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.KilogramPerKilomole, new CultureInfo("en-US"), false, true, new string[]{"kg/kmol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.KilogramPerMole, new CultureInfo("en-US"), false, true, new string[]{"kg/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.KilogramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"кг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.KilopoundPerMole, new CultureInfo("en-US"), false, true, new string[]{"klb/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.KilopoundPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"кфунт/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.MegapoundPerMole, new CultureInfo("en-US"), false, true, new string[]{"Mlb/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.MegapoundPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"Мфунт/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.MicrogramPerMole, new CultureInfo("en-US"), false, true, new string[]{"µg/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.MicrogramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"мкг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.MilligramPerMole, new CultureInfo("en-US"), false, true, new string[]{"mg/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.MilligramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"мг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.NanogramPerMole, new CultureInfo("en-US"), false, true, new string[]{"ng/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.NanogramPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"нг/моль"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.PoundPerMole, new CultureInfo("en-US"), false, true, new string[]{"lb/mol"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarMassUnit.PoundPerMole, new CultureInfo("ru-RU"), false, true, new string[]{"фунт/моль"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs index 8861e28cc0..c728ec7931 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs @@ -68,17 +68,17 @@ static Molarity() Info = new QuantityInfo("Molarity", new UnitInfo[] { - new UnitInfo(MolarityUnit.CentimolePerLiter, "CentimolesPerLiter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.DecimolePerLiter, "DecimolesPerLiter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.FemtomolePerLiter, "FemtomolesPerLiter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.KilomolePerCubicMeter, "KilomolesPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.MicromolePerLiter, "MicromolesPerLiter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.MillimolePerLiter, "MillimolesPerLiter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.MolePerCubicMeter, "MolesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, amount: AmountOfSubstanceUnit.Mole)), - new UnitInfo(MolarityUnit.MolePerLiter, "MolesPerLiter", new BaseUnits(length: LengthUnit.Decimeter, amount: AmountOfSubstanceUnit.Mole)), - new UnitInfo(MolarityUnit.NanomolePerLiter, "NanomolesPerLiter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.PicomolePerLiter, "PicomolesPerLiter", BaseUnits.Undefined), - new UnitInfo(MolarityUnit.PoundMolePerCubicFoot, "PoundMolesPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, amount: AmountOfSubstanceUnit.PoundMole)), + new UnitInfo(MolarityUnit.CentimolePerLiter, "CentimolesPerLiter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.DecimolePerLiter, "DecimolesPerLiter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.FemtomolePerLiter, "FemtomolesPerLiter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.KilomolePerCubicMeter, "KilomolesPerCubicMeter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.MicromolePerLiter, "MicromolesPerLiter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.MillimolePerLiter, "MillimolesPerLiter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.MolePerCubicMeter, "MolesPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, amount: AmountOfSubstanceUnit.Mole), "Molarity"), + new UnitInfo(MolarityUnit.MolePerLiter, "MolesPerLiter", new BaseUnits(length: LengthUnit.Decimeter, amount: AmountOfSubstanceUnit.Mole), "Molarity"), + new UnitInfo(MolarityUnit.NanomolePerLiter, "NanomolesPerLiter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.PicomolePerLiter, "PicomolesPerLiter", BaseUnits.Undefined, "Molarity"), + new UnitInfo(MolarityUnit.PoundMolePerCubicFoot, "PoundMolesPerCubicFoot", new BaseUnits(length: LengthUnit.Foot, amount: AmountOfSubstanceUnit.PoundMole), "Molarity"), }, BaseUnit, Zero, BaseDimensions); @@ -275,21 +275,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(MolarityUnit.MolePerCubicMeter, MolarityUnit.PoundMolePerCubicFoot, quantity => quantity.ToUnit(MolarityUnit.PoundMolePerCubicFoot)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.CentimolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"cmol/L", "cM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.DecimolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"dmol/L", "dM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.FemtomolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"fmol/L", "fM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.KilomolePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kmol/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.MicromolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"µmol/L", "µM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.MillimolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"mmol/L", "mM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.MolePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"mol/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.MolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"mol/L", "M"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.NanomolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"nmol/L", "nM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.PicomolePerLiter, new CultureInfo("en-US"), false, true, new string[]{"pmol/L", "pM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(MolarityUnit.PoundMolePerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"lbmol/ft³"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs index 5c7cd6d9df..0de43210cd 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs @@ -68,7 +68,7 @@ static Permeability() Info = new QuantityInfo("Permeability", new UnitInfo[] { - new UnitInfo(PermeabilityUnit.HenryPerMeter, "HenriesPerMeter", BaseUnits.Undefined), + new UnitInfo(PermeabilityUnit.HenryPerMeter, "HenriesPerMeter", BaseUnits.Undefined, "Permeability"), }, BaseUnit, Zero, BaseDimensions); @@ -195,11 +195,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> PermeabilityUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PermeabilityUnit.HenryPerMeter, new CultureInfo("en-US"), false, true, new string[]{"H/m"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs index 908f12e4c5..7867d88eb1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs @@ -68,7 +68,7 @@ static Permittivity() Info = new QuantityInfo("Permittivity", new UnitInfo[] { - new UnitInfo(PermittivityUnit.FaradPerMeter, "FaradsPerMeter", BaseUnits.Undefined), + new UnitInfo(PermittivityUnit.FaradPerMeter, "FaradsPerMeter", BaseUnits.Undefined, "Permittivity"), }, BaseUnit, Zero, BaseDimensions); @@ -195,11 +195,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> PermittivityUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PermittivityUnit.FaradPerMeter, new CultureInfo("en-US"), false, true, new string[]{"F/m"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs index 1dda135c8e..282e58b5ad 100644 --- a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs @@ -68,11 +68,11 @@ static PorousMediumPermeability() Info = new QuantityInfo("PorousMediumPermeability", new UnitInfo[] { - new UnitInfo(PorousMediumPermeabilityUnit.Darcy, "Darcys", BaseUnits.Undefined), - new UnitInfo(PorousMediumPermeabilityUnit.Microdarcy, "Microdarcys", BaseUnits.Undefined), - new UnitInfo(PorousMediumPermeabilityUnit.Millidarcy, "Millidarcys", BaseUnits.Undefined), - new UnitInfo(PorousMediumPermeabilityUnit.SquareCentimeter, "SquareCentimeters", new BaseUnits(length: LengthUnit.Centimeter)), - new UnitInfo(PorousMediumPermeabilityUnit.SquareMeter, "SquareMeters", new BaseUnits(length: LengthUnit.Meter)), + new UnitInfo(PorousMediumPermeabilityUnit.Darcy, "Darcys", BaseUnits.Undefined, "PorousMediumPermeability"), + new UnitInfo(PorousMediumPermeabilityUnit.Microdarcy, "Microdarcys", BaseUnits.Undefined, "PorousMediumPermeability"), + new UnitInfo(PorousMediumPermeabilityUnit.Millidarcy, "Millidarcys", BaseUnits.Undefined, "PorousMediumPermeability"), + new UnitInfo(PorousMediumPermeabilityUnit.SquareCentimeter, "SquareCentimeters", new BaseUnits(length: LengthUnit.Centimeter), "PorousMediumPermeability"), + new UnitInfo(PorousMediumPermeabilityUnit.SquareMeter, "SquareMeters", new BaseUnits(length: LengthUnit.Meter), "PorousMediumPermeability"), }, BaseUnit, Zero, BaseDimensions); @@ -227,15 +227,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(PorousMediumPermeabilityUnit.SquareMeter, PorousMediumPermeabilityUnit.SquareCentimeter, quantity => quantity.ToUnit(PorousMediumPermeabilityUnit.SquareCentimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PorousMediumPermeabilityUnit.Darcy, new CultureInfo("en-US"), false, true, new string[]{"D"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PorousMediumPermeabilityUnit.Microdarcy, new CultureInfo("en-US"), false, true, new string[]{"µD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PorousMediumPermeabilityUnit.Millidarcy, new CultureInfo("en-US"), false, true, new string[]{"mD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PorousMediumPermeabilityUnit.SquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PorousMediumPermeabilityUnit.SquareMeter, new CultureInfo("en-US"), false, true, new string[]{"m²"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Power.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.g.cs index ee45a674fe..9ff504efa0 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.g.cs @@ -66,32 +66,32 @@ static Power() Info = new QuantityInfo("Power", new UnitInfo[] { - new UnitInfo(PowerUnit.BoilerHorsepower, "BoilerHorsepower", BaseUnits.Undefined), - new UnitInfo(PowerUnit.BritishThermalUnitPerHour, "BritishThermalUnitsPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Decawatt, "Decawatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Deciwatt, "Deciwatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.ElectricalHorsepower, "ElectricalHorsepower", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Femtowatt, "Femtowatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.GigajoulePerHour, "GigajoulesPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Gigawatt, "Gigawatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.HydraulicHorsepower, "HydraulicHorsepower", BaseUnits.Undefined), - new UnitInfo(PowerUnit.JoulePerHour, "JoulesPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.KilobritishThermalUnitPerHour, "KilobritishThermalUnitsPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.KilojoulePerHour, "KilojoulesPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Kilowatt, "Kilowatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.MechanicalHorsepower, "MechanicalHorsepower", BaseUnits.Undefined), - new UnitInfo(PowerUnit.MegabritishThermalUnitPerHour, "MegabritishThermalUnitsPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.MegajoulePerHour, "MegajoulesPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Megawatt, "Megawatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.MetricHorsepower, "MetricHorsepower", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Microwatt, "Microwatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.MillijoulePerHour, "MillijoulesPerHour", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Milliwatt, "Milliwatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Nanowatt, "Nanowatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Petawatt, "Petawatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Picowatt, "Picowatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Terawatt, "Terawatts", BaseUnits.Undefined), - new UnitInfo(PowerUnit.Watt, "Watts", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second)), + new UnitInfo(PowerUnit.BoilerHorsepower, "BoilerHorsepower", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.BritishThermalUnitPerHour, "BritishThermalUnitsPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Decawatt, "Decawatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Deciwatt, "Deciwatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.ElectricalHorsepower, "ElectricalHorsepower", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Femtowatt, "Femtowatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.GigajoulePerHour, "GigajoulesPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Gigawatt, "Gigawatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.HydraulicHorsepower, "HydraulicHorsepower", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.JoulePerHour, "JoulesPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.KilobritishThermalUnitPerHour, "KilobritishThermalUnitsPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.KilojoulePerHour, "KilojoulesPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Kilowatt, "Kilowatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.MechanicalHorsepower, "MechanicalHorsepower", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.MegabritishThermalUnitPerHour, "MegabritishThermalUnitsPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.MegajoulePerHour, "MegajoulesPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Megawatt, "Megawatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.MetricHorsepower, "MetricHorsepower", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Microwatt, "Microwatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.MillijoulePerHour, "MillijoulesPerHour", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Milliwatt, "Milliwatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Nanowatt, "Nanowatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Petawatt, "Petawatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Picowatt, "Picowatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Terawatt, "Terawatts", BaseUnits.Undefined, "Power"), + new UnitInfo(PowerUnit.Watt, "Watts", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second), "Power"), }, BaseUnit, Zero, BaseDimensions); @@ -393,36 +393,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(PowerUnit.Watt, PowerUnit.Terawatt, quantity => quantity.ToUnit(PowerUnit.Terawatt)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.BoilerHorsepower, new CultureInfo("en-US"), false, true, new string[]{"hp(S)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.BritishThermalUnitPerHour, new CultureInfo("en-US"), false, true, new string[]{"Btu/h", "Btu/hr"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Decawatt, new CultureInfo("en-US"), false, true, new string[]{"daW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Deciwatt, new CultureInfo("en-US"), false, true, new string[]{"dW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.ElectricalHorsepower, new CultureInfo("en-US"), false, true, new string[]{"hp(E)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Femtowatt, new CultureInfo("en-US"), false, true, new string[]{"fW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.GigajoulePerHour, new CultureInfo("en-US"), false, true, new string[]{"GJ/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Gigawatt, new CultureInfo("en-US"), false, true, new string[]{"GW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.HydraulicHorsepower, new CultureInfo("en-US"), false, true, new string[]{"hp(H)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.JoulePerHour, new CultureInfo("en-US"), false, true, new string[]{"J/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.KilobritishThermalUnitPerHour, new CultureInfo("en-US"), false, true, new string[]{"kBtu/h", "kBtu/hr"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.KilojoulePerHour, new CultureInfo("en-US"), false, true, new string[]{"kJ/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Kilowatt, new CultureInfo("en-US"), false, true, new string[]{"kW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.MechanicalHorsepower, new CultureInfo("en-US"), false, true, new string[]{"hp(I)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.MegabritishThermalUnitPerHour, new CultureInfo("en-US"), false, true, new string[]{"MBtu/h", "MBtu/hr"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.MegajoulePerHour, new CultureInfo("en-US"), false, true, new string[]{"MJ/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Megawatt, new CultureInfo("en-US"), false, true, new string[]{"MW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.MetricHorsepower, new CultureInfo("en-US"), false, true, new string[]{"hp(M)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Microwatt, new CultureInfo("en-US"), false, true, new string[]{"µW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.MillijoulePerHour, new CultureInfo("en-US"), false, true, new string[]{"mJ/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Milliwatt, new CultureInfo("en-US"), false, true, new string[]{"mW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Nanowatt, new CultureInfo("en-US"), false, true, new string[]{"nW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Petawatt, new CultureInfo("en-US"), false, true, new string[]{"PW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Picowatt, new CultureInfo("en-US"), false, true, new string[]{"pW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Terawatt, new CultureInfo("en-US"), false, true, new string[]{"TW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerUnit.Watt, new CultureInfo("en-US"), false, true, new string[]{"W"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs index 2b66d23aeb..a9bb47694c 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs @@ -65,50 +65,50 @@ static PowerDensity() Info = new QuantityInfo("PowerDensity", new UnitInfo[] { - new UnitInfo(PowerDensityUnit.DecawattPerCubicFoot, "DecawattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.DecawattPerCubicInch, "DecawattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.DecawattPerCubicMeter, "DecawattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.DecawattPerLiter, "DecawattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.DeciwattPerCubicFoot, "DeciwattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.DeciwattPerCubicInch, "DeciwattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.DeciwattPerCubicMeter, "DeciwattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.DeciwattPerLiter, "DeciwattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.GigawattPerCubicFoot, "GigawattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.GigawattPerCubicInch, "GigawattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.GigawattPerCubicMeter, "GigawattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.GigawattPerLiter, "GigawattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.KilowattPerCubicFoot, "KilowattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.KilowattPerCubicInch, "KilowattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.KilowattPerCubicMeter, "KilowattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.KilowattPerLiter, "KilowattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MegawattPerCubicFoot, "MegawattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MegawattPerCubicInch, "MegawattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MegawattPerCubicMeter, "MegawattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MegawattPerLiter, "MegawattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MicrowattPerCubicFoot, "MicrowattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MicrowattPerCubicInch, "MicrowattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MicrowattPerCubicMeter, "MicrowattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MicrowattPerLiter, "MicrowattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MilliwattPerCubicFoot, "MilliwattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MilliwattPerCubicInch, "MilliwattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MilliwattPerCubicMeter, "MilliwattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.MilliwattPerLiter, "MilliwattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.NanowattPerCubicFoot, "NanowattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.NanowattPerCubicInch, "NanowattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.NanowattPerCubicMeter, "NanowattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.NanowattPerLiter, "NanowattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.PicowattPerCubicFoot, "PicowattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.PicowattPerCubicInch, "PicowattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.PicowattPerCubicMeter, "PicowattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.PicowattPerLiter, "PicowattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.TerawattPerCubicFoot, "TerawattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.TerawattPerCubicInch, "TerawattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.TerawattPerCubicMeter, "TerawattsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.TerawattPerLiter, "TerawattsPerLiter", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.WattPerCubicFoot, "WattsPerCubicFoot", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.WattPerCubicInch, "WattsPerCubicInch", BaseUnits.Undefined), - new UnitInfo(PowerDensityUnit.WattPerCubicMeter, "WattsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second)), - new UnitInfo(PowerDensityUnit.WattPerLiter, "WattsPerLiter", BaseUnits.Undefined), + new UnitInfo(PowerDensityUnit.DecawattPerCubicFoot, "DecawattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.DecawattPerCubicInch, "DecawattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.DecawattPerCubicMeter, "DecawattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.DecawattPerLiter, "DecawattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.DeciwattPerCubicFoot, "DeciwattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.DeciwattPerCubicInch, "DeciwattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.DeciwattPerCubicMeter, "DeciwattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.DeciwattPerLiter, "DeciwattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.GigawattPerCubicFoot, "GigawattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.GigawattPerCubicInch, "GigawattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.GigawattPerCubicMeter, "GigawattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.GigawattPerLiter, "GigawattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.KilowattPerCubicFoot, "KilowattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.KilowattPerCubicInch, "KilowattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.KilowattPerCubicMeter, "KilowattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.KilowattPerLiter, "KilowattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MegawattPerCubicFoot, "MegawattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MegawattPerCubicInch, "MegawattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MegawattPerCubicMeter, "MegawattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MegawattPerLiter, "MegawattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MicrowattPerCubicFoot, "MicrowattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MicrowattPerCubicInch, "MicrowattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MicrowattPerCubicMeter, "MicrowattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MicrowattPerLiter, "MicrowattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MilliwattPerCubicFoot, "MilliwattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MilliwattPerCubicInch, "MilliwattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MilliwattPerCubicMeter, "MilliwattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.MilliwattPerLiter, "MilliwattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.NanowattPerCubicFoot, "NanowattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.NanowattPerCubicInch, "NanowattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.NanowattPerCubicMeter, "NanowattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.NanowattPerLiter, "NanowattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.PicowattPerCubicFoot, "PicowattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.PicowattPerCubicInch, "PicowattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.PicowattPerCubicMeter, "PicowattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.PicowattPerLiter, "PicowattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.TerawattPerCubicFoot, "TerawattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.TerawattPerCubicInch, "TerawattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.TerawattPerCubicMeter, "TerawattsPerCubicMeter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.TerawattPerLiter, "TerawattsPerLiter", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.WattPerCubicFoot, "WattsPerCubicFoot", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.WattPerCubicInch, "WattsPerCubicInch", BaseUnits.Undefined, "PowerDensity"), + new UnitInfo(PowerDensityUnit.WattPerCubicMeter, "WattsPerCubicMeter", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second), "PowerDensity"), + new UnitInfo(PowerDensityUnit.WattPerLiter, "WattsPerLiter", BaseUnits.Undefined, "PowerDensity"), }, BaseUnit, Zero, BaseDimensions); @@ -536,54 +536,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(PowerDensityUnit.WattPerCubicMeter, PowerDensityUnit.WattPerLiter, quantity => quantity.ToUnit(PowerDensityUnit.WattPerLiter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DecawattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"daW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DecawattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"daW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DecawattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"daW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DecawattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"daW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DeciwattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"dW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DeciwattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"dW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DeciwattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"dW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.DeciwattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"dW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.GigawattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"GW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.GigawattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"GW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.GigawattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"GW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.GigawattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"GW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.KilowattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"kW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.KilowattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"kW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.KilowattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.KilowattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"kW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MegawattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"MW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MegawattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"MW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MegawattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"MW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MegawattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"MW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MicrowattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"µW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MicrowattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"µW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MicrowattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"µW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MicrowattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"µW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MilliwattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"mW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MilliwattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"mW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MilliwattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"mW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.MilliwattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"mW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.NanowattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"nW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.NanowattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"nW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.NanowattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"nW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.NanowattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"nW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.PicowattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"pW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.PicowattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"pW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.PicowattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"pW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.PicowattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"pW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.TerawattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"TW/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.TerawattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"TW/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.TerawattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"TW/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.TerawattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"TW/l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.WattPerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"W/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.WattPerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"W/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.WattPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"W/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerDensityUnit.WattPerLiter, new CultureInfo("en-US"), false, true, new string[]{"W/l"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs index 97e51c30d0..2ecdf22c02 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs @@ -65,8 +65,8 @@ static PowerRatio() Info = new QuantityInfo("PowerRatio", new UnitInfo[] { - new UnitInfo(PowerRatioUnit.DecibelMilliwatt, "DecibelMilliwatts", BaseUnits.Undefined), - new UnitInfo(PowerRatioUnit.DecibelWatt, "DecibelWatts", BaseUnits.Undefined), + new UnitInfo(PowerRatioUnit.DecibelMilliwatt, "DecibelMilliwatts", BaseUnits.Undefined, "PowerRatio"), + new UnitInfo(PowerRatioUnit.DecibelWatt, "DecibelWatts", BaseUnits.Undefined, "PowerRatio"), }, BaseUnit, Zero, BaseDimensions); @@ -200,12 +200,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(PowerRatioUnit.DecibelWatt, PowerRatioUnit.DecibelMilliwatt, quantity => quantity.ToUnit(PowerRatioUnit.DecibelMilliwatt)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PowerRatioUnit.DecibelMilliwatt, new CultureInfo("en-US"), false, true, new string[]{"dBmW", "dBm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PowerRatioUnit.DecibelWatt, new CultureInfo("en-US"), false, true, new string[]{"dBW"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs index 251a1e968e..5d03b3170b 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs @@ -65,55 +65,55 @@ static Pressure() Info = new QuantityInfo("Pressure", new UnitInfo[] { - new UnitInfo(PressureUnit.Atmosphere, "Atmospheres", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Bar, "Bars", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Centibar, "Centibars", BaseUnits.Undefined), - new UnitInfo(PressureUnit.CentimeterOfWaterColumn, "CentimetersOfWaterColumn", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Decapascal, "Decapascals", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Decibar, "Decibars", BaseUnits.Undefined), - new UnitInfo(PressureUnit.DynePerSquareCentimeter, "DynesPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.FootOfElevation, "FeetOfElevation", BaseUnits.Undefined), - new UnitInfo(PressureUnit.FootOfHead, "FeetOfHead", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Gigapascal, "Gigapascals", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Hectopascal, "Hectopascals", BaseUnits.Undefined), - new UnitInfo(PressureUnit.InchOfMercury, "InchesOfMercury", BaseUnits.Undefined), - new UnitInfo(PressureUnit.InchOfWaterColumn, "InchesOfWaterColumn", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Kilobar, "Kilobars", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilogramForcePerSquareCentimeter, "KilogramsForcePerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilogramForcePerSquareMeter, "KilogramsForcePerSquareMeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilogramForcePerSquareMillimeter, "KilogramsForcePerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilonewtonPerSquareCentimeter, "KilonewtonsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilonewtonPerSquareMeter, "KilonewtonsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilonewtonPerSquareMillimeter, "KilonewtonsPerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Kilopascal, "Kilopascals", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilopoundForcePerSquareFoot, "KilopoundsForcePerSquareFoot", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilopoundForcePerSquareInch, "KilopoundsForcePerSquareInch", BaseUnits.Undefined), - new UnitInfo(PressureUnit.KilopoundForcePerSquareMil, "KilopoundsForcePerSquareMil", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Megabar, "Megabars", BaseUnits.Undefined), - new UnitInfo(PressureUnit.MeganewtonPerSquareMeter, "MeganewtonsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Megapascal, "Megapascals", BaseUnits.Undefined), - new UnitInfo(PressureUnit.MeterOfElevation, "MetersOfElevation", BaseUnits.Undefined), - new UnitInfo(PressureUnit.MeterOfHead, "MetersOfHead", BaseUnits.Undefined), - new UnitInfo(PressureUnit.MeterOfWaterColumn, "MetersOfWaterColumn", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Microbar, "Microbars", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Micropascal, "Micropascals", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Millibar, "Millibars", BaseUnits.Undefined), - new UnitInfo(PressureUnit.MillimeterOfMercury, "MillimetersOfMercury", BaseUnits.Undefined), - new UnitInfo(PressureUnit.MillimeterOfWaterColumn, "MillimetersOfWaterColumn", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Millipascal, "Millipascals", BaseUnits.Undefined), - new UnitInfo(PressureUnit.NewtonPerSquareCentimeter, "NewtonsPerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.NewtonPerSquareMeter, "NewtonsPerSquareMeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.NewtonPerSquareMillimeter, "NewtonsPerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Pascal, "Pascals", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second)), - new UnitInfo(PressureUnit.PoundForcePerSquareFoot, "PoundsForcePerSquareFoot", BaseUnits.Undefined), - new UnitInfo(PressureUnit.PoundForcePerSquareInch, "PoundsForcePerSquareInch", BaseUnits.Undefined), - new UnitInfo(PressureUnit.PoundForcePerSquareMil, "PoundsForcePerSquareMil", BaseUnits.Undefined), - new UnitInfo(PressureUnit.PoundPerInchSecondSquared, "PoundsPerInchSecondSquared", BaseUnits.Undefined), - new UnitInfo(PressureUnit.TechnicalAtmosphere, "TechnicalAtmospheres", BaseUnits.Undefined), - new UnitInfo(PressureUnit.TonneForcePerSquareCentimeter, "TonnesForcePerSquareCentimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.TonneForcePerSquareMeter, "TonnesForcePerSquareMeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.TonneForcePerSquareMillimeter, "TonnesForcePerSquareMillimeter", BaseUnits.Undefined), - new UnitInfo(PressureUnit.Torr, "Torrs", BaseUnits.Undefined), + new UnitInfo(PressureUnit.Atmosphere, "Atmospheres", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Bar, "Bars", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Centibar, "Centibars", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.CentimeterOfWaterColumn, "CentimetersOfWaterColumn", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Decapascal, "Decapascals", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Decibar, "Decibars", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.DynePerSquareCentimeter, "DynesPerSquareCentimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.FootOfElevation, "FeetOfElevation", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.FootOfHead, "FeetOfHead", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Gigapascal, "Gigapascals", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Hectopascal, "Hectopascals", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.InchOfMercury, "InchesOfMercury", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.InchOfWaterColumn, "InchesOfWaterColumn", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Kilobar, "Kilobars", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilogramForcePerSquareCentimeter, "KilogramsForcePerSquareCentimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilogramForcePerSquareMeter, "KilogramsForcePerSquareMeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilogramForcePerSquareMillimeter, "KilogramsForcePerSquareMillimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilonewtonPerSquareCentimeter, "KilonewtonsPerSquareCentimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilonewtonPerSquareMeter, "KilonewtonsPerSquareMeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilonewtonPerSquareMillimeter, "KilonewtonsPerSquareMillimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Kilopascal, "Kilopascals", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilopoundForcePerSquareFoot, "KilopoundsForcePerSquareFoot", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilopoundForcePerSquareInch, "KilopoundsForcePerSquareInch", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.KilopoundForcePerSquareMil, "KilopoundsForcePerSquareMil", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Megabar, "Megabars", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.MeganewtonPerSquareMeter, "MeganewtonsPerSquareMeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Megapascal, "Megapascals", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.MeterOfElevation, "MetersOfElevation", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.MeterOfHead, "MetersOfHead", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.MeterOfWaterColumn, "MetersOfWaterColumn", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Microbar, "Microbars", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Micropascal, "Micropascals", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Millibar, "Millibars", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.MillimeterOfMercury, "MillimetersOfMercury", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.MillimeterOfWaterColumn, "MillimetersOfWaterColumn", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Millipascal, "Millipascals", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.NewtonPerSquareCentimeter, "NewtonsPerSquareCentimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.NewtonPerSquareMeter, "NewtonsPerSquareMeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.NewtonPerSquareMillimeter, "NewtonsPerSquareMillimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Pascal, "Pascals", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Kilogram, time: DurationUnit.Second), "Pressure"), + new UnitInfo(PressureUnit.PoundForcePerSquareFoot, "PoundsForcePerSquareFoot", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.PoundForcePerSquareInch, "PoundsForcePerSquareInch", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.PoundForcePerSquareMil, "PoundsForcePerSquareMil", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.PoundPerInchSecondSquared, "PoundsPerInchSecondSquared", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.TechnicalAtmosphere, "TechnicalAtmospheres", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.TonneForcePerSquareCentimeter, "TonnesForcePerSquareCentimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.TonneForcePerSquareMeter, "TonnesForcePerSquareMeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.TonneForcePerSquareMillimeter, "TonnesForcePerSquareMillimeter", BaseUnits.Undefined, "Pressure"), + new UnitInfo(PressureUnit.Torr, "Torrs", BaseUnits.Undefined, "Pressure"), }, BaseUnit, Zero, BaseDimensions); @@ -576,90 +576,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(PressureUnit.Pascal, PressureUnit.Torr, quantity => quantity.ToUnit(PressureUnit.Torr)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Atmosphere, new CultureInfo("en-US"), false, true, new string[]{"atm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Atmosphere, new CultureInfo("ru-RU"), false, true, new string[]{"атм"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Bar, new CultureInfo("en-US"), false, true, new string[]{"bar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Bar, new CultureInfo("ru-RU"), false, true, new string[]{"бар"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Centibar, new CultureInfo("en-US"), false, true, new string[]{"cbar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Centibar, new CultureInfo("ru-RU"), false, true, new string[]{"сбар"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.CentimeterOfWaterColumn, new CultureInfo("en-US"), false, true, new string[]{"cmH₂O", "cmH2O", "cm wc", "cm wg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Decapascal, new CultureInfo("en-US"), false, true, new string[]{"daPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Decapascal, new CultureInfo("ru-RU"), false, true, new string[]{"даПа"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Decibar, new CultureInfo("en-US"), false, true, new string[]{"dbar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Decibar, new CultureInfo("ru-RU"), false, true, new string[]{"дбар"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.DynePerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"dyn/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.FootOfElevation, new CultureInfo("en-US"), false, true, new string[]{"ft of elevation"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.FootOfHead, new CultureInfo("en-US"), false, true, new string[]{"ft of head"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Gigapascal, new CultureInfo("en-US"), false, true, new string[]{"GPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Gigapascal, new CultureInfo("ru-RU"), false, true, new string[]{"ГПа"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Hectopascal, new CultureInfo("en-US"), false, true, new string[]{"hPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Hectopascal, new CultureInfo("ru-RU"), false, true, new string[]{"гПа"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.InchOfMercury, new CultureInfo("en-US"), false, true, new string[]{"inHg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.InchOfWaterColumn, new CultureInfo("en-US"), false, true, new string[]{"inH2O", "inch wc", "wc"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Kilobar, new CultureInfo("en-US"), false, true, new string[]{"kbar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Kilobar, new CultureInfo("ru-RU"), false, true, new string[]{"кбар"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilogramForcePerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilogramForcePerSquareCentimeter, new CultureInfo("ru-RU"), false, true, new string[]{"кгс/см²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilogramForcePerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilogramForcePerSquareMeter, new CultureInfo("ru-RU"), false, true, new string[]{"кгс/м²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilogramForcePerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilogramForcePerSquareMillimeter, new CultureInfo("ru-RU"), false, true, new string[]{"кгс/мм²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilonewtonPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kN/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilonewtonPerSquareCentimeter, new CultureInfo("ru-RU"), false, true, new string[]{"кН/см²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilonewtonPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"kN/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilonewtonPerSquareMeter, new CultureInfo("ru-RU"), false, true, new string[]{"кН/м²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilonewtonPerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kN/mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilonewtonPerSquareMillimeter, new CultureInfo("ru-RU"), false, true, new string[]{"кН/мм²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Kilopascal, new CultureInfo("en-US"), false, true, new string[]{"kPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Kilopascal, new CultureInfo("ru-RU"), false, true, new string[]{"кПа"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilopoundForcePerSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"kipf/ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilopoundForcePerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"ksi", "kipf/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilopoundForcePerSquareInch, new CultureInfo("ru-RU"), false, true, new string[]{"ksi", "kipf/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.KilopoundForcePerSquareMil, new CultureInfo("en-US"), false, true, new string[]{"kipf/mil²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Megabar, new CultureInfo("en-US"), false, true, new string[]{"Mbar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Megabar, new CultureInfo("ru-RU"), false, true, new string[]{"Мбар"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.MeganewtonPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"MN/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.MeganewtonPerSquareMeter, new CultureInfo("ru-RU"), false, true, new string[]{"МН/м²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Megapascal, new CultureInfo("en-US"), false, true, new string[]{"MPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Megapascal, new CultureInfo("ru-RU"), false, true, new string[]{"МПа"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.MeterOfElevation, new CultureInfo("en-US"), false, true, new string[]{"m of elevation"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.MeterOfHead, new CultureInfo("en-US"), false, true, new string[]{"m of head"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.MeterOfWaterColumn, new CultureInfo("en-US"), false, true, new string[]{"mH₂O", "mH2O", "m wc", "m wg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Microbar, new CultureInfo("en-US"), false, true, new string[]{"µbar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Microbar, new CultureInfo("ru-RU"), false, true, new string[]{"мкбар"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Micropascal, new CultureInfo("en-US"), false, true, new string[]{"µPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Micropascal, new CultureInfo("ru-RU"), false, true, new string[]{"мкПа"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Millibar, new CultureInfo("en-US"), false, true, new string[]{"mbar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Millibar, new CultureInfo("ru-RU"), false, true, new string[]{"мбар"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.MillimeterOfMercury, new CultureInfo("en-US"), false, true, new string[]{"mmHg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.MillimeterOfMercury, new CultureInfo("ru-RU"), false, true, new string[]{"мм рт.ст."}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.MillimeterOfWaterColumn, new CultureInfo("en-US"), false, true, new string[]{"mmH₂O", "mmH2O", "mm wc", "mm wg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Millipascal, new CultureInfo("en-US"), false, true, new string[]{"mPa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Millipascal, new CultureInfo("ru-RU"), false, true, new string[]{"мПа"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.NewtonPerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"N/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.NewtonPerSquareCentimeter, new CultureInfo("ru-RU"), false, true, new string[]{"Н/см²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.NewtonPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"N/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.NewtonPerSquareMeter, new CultureInfo("ru-RU"), false, true, new string[]{"Н/м²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.NewtonPerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"N/mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.NewtonPerSquareMillimeter, new CultureInfo("ru-RU"), false, true, new string[]{"Н/мм²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Pascal, new CultureInfo("en-US"), false, true, new string[]{"Pa"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Pascal, new CultureInfo("ru-RU"), false, true, new string[]{"Па"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.PoundForcePerSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"lb/ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.PoundForcePerSquareInch, new CultureInfo("en-US"), false, true, new string[]{"psi", "lb/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.PoundForcePerSquareInch, new CultureInfo("ru-RU"), false, true, new string[]{"psi", "lb/in²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.PoundForcePerSquareMil, new CultureInfo("en-US"), false, true, new string[]{"lb/mil²", "lbs/mil²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.PoundPerInchSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"lbm/(in·s²)", "lb/(in·s²)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.TechnicalAtmosphere, new CultureInfo("en-US"), false, true, new string[]{"at"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.TechnicalAtmosphere, new CultureInfo("ru-RU"), false, true, new string[]{"ат"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.TonneForcePerSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"tf/cm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.TonneForcePerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"tf/m²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.TonneForcePerSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"tf/mm²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Torr, new CultureInfo("en-US"), false, true, new string[]{"torr"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureUnit.Torr, new CultureInfo("ru-RU"), false, true, new string[]{"торр"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs index 253ca8ae73..2622c479fe 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs @@ -65,20 +65,20 @@ static PressureChangeRate() Info = new QuantityInfo("PressureChangeRate", new UnitInfo[] { - new UnitInfo(PressureChangeRateUnit.AtmospherePerSecond, "AtmospheresPerSecond", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.KilopascalPerMinute, "KilopascalsPerMinute", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.KilopascalPerSecond, "KilopascalsPerSecond", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.KilopoundForcePerSquareInchPerMinute, "KilopoundsForcePerSquareInchPerMinute", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.KilopoundForcePerSquareInchPerSecond, "KilopoundsForcePerSquareInchPerSecond", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.MegapascalPerMinute, "MegapascalsPerMinute", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.MegapascalPerSecond, "MegapascalsPerSecond", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.MegapoundForcePerSquareInchPerMinute, "MegapoundsForcePerSquareInchPerMinute", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.MegapoundForcePerSquareInchPerSecond, "MegapoundsForcePerSquareInchPerSecond", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.MillimeterOfMercuryPerSecond, "MillimetersOfMercuryPerSecond", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.PascalPerMinute, "PascalsPerMinute", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.PascalPerSecond, "PascalsPerSecond", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.PoundForcePerSquareInchPerMinute, "PoundsForcePerSquareInchPerMinute", BaseUnits.Undefined), - new UnitInfo(PressureChangeRateUnit.PoundForcePerSquareInchPerSecond, "PoundsForcePerSquareInchPerSecond", BaseUnits.Undefined), + new UnitInfo(PressureChangeRateUnit.AtmospherePerSecond, "AtmospheresPerSecond", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.KilopascalPerMinute, "KilopascalsPerMinute", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.KilopascalPerSecond, "KilopascalsPerSecond", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.KilopoundForcePerSquareInchPerMinute, "KilopoundsForcePerSquareInchPerMinute", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.KilopoundForcePerSquareInchPerSecond, "KilopoundsForcePerSquareInchPerSecond", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.MegapascalPerMinute, "MegapascalsPerMinute", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.MegapascalPerSecond, "MegapascalsPerSecond", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.MegapoundForcePerSquareInchPerMinute, "MegapoundsForcePerSquareInchPerMinute", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.MegapoundForcePerSquareInchPerSecond, "MegapoundsForcePerSquareInchPerSecond", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.MillimeterOfMercuryPerSecond, "MillimetersOfMercuryPerSecond", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.PascalPerMinute, "PascalsPerMinute", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.PascalPerSecond, "PascalsPerSecond", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.PoundForcePerSquareInchPerMinute, "PoundsForcePerSquareInchPerMinute", BaseUnits.Undefined, "PressureChangeRate"), + new UnitInfo(PressureChangeRateUnit.PoundForcePerSquareInchPerSecond, "PoundsForcePerSquareInchPerSecond", BaseUnits.Undefined, "PressureChangeRate"), }, BaseUnit, Zero, BaseDimensions); @@ -296,38 +296,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(PressureChangeRateUnit.PascalPerSecond, PressureChangeRateUnit.PoundForcePerSquareInchPerSecond, quantity => quantity.ToUnit(PressureChangeRateUnit.PoundForcePerSquareInchPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.AtmospherePerSecond, new CultureInfo("en-US"), false, true, new string[]{"atm/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.AtmospherePerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"атм/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopascalPerMinute, new CultureInfo("en-US"), false, true, new string[]{"kPa/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopascalPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"кПа/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopascalPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kPa/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopascalPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"кПа/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopoundForcePerSquareInchPerMinute, new CultureInfo("en-US"), false, true, new string[]{"ksi/min", "kipf/in²/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopoundForcePerSquareInchPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"ksi/мин", "kipf/in²/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopoundForcePerSquareInchPerSecond, new CultureInfo("en-US"), false, true, new string[]{"ksi/s", "kipf/in²/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.KilopoundForcePerSquareInchPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"ksi/с", "kipf/in²/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapascalPerMinute, new CultureInfo("en-US"), false, true, new string[]{"MPa/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapascalPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"МПа/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapascalPerSecond, new CultureInfo("en-US"), false, true, new string[]{"MPa/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapascalPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"МПа/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapoundForcePerSquareInchPerMinute, new CultureInfo("en-US"), false, true, new string[]{"Mpsi/min", "Mlb/in²/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapoundForcePerSquareInchPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"Мpsi/мин", "Мlb/in²/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapoundForcePerSquareInchPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Mpsi/s", "Mlb/in²/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MegapoundForcePerSquareInchPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"Мpsi/с", "Мlb/in²/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MillimeterOfMercuryPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mmHg/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.MillimeterOfMercuryPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"mmHg/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PascalPerMinute, new CultureInfo("en-US"), false, true, new string[]{"Pa/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PascalPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"Па/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PascalPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Pa/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PascalPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"Па/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PoundForcePerSquareInchPerMinute, new CultureInfo("en-US"), false, true, new string[]{"psi/min", "lb/in²/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PoundForcePerSquareInchPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"psi/мин", "lb/in²/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PoundForcePerSquareInchPerSecond, new CultureInfo("en-US"), false, true, new string[]{"psi/s", "lb/in²/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(PressureChangeRateUnit.PoundForcePerSquareInchPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"psi/с", "lb/in²/с"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs index 72bddc57fe..b9e1392ee4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs @@ -65,12 +65,12 @@ static Ratio() Info = new QuantityInfo("Ratio", new UnitInfo[] { - new UnitInfo(RatioUnit.DecimalFraction, "DecimalFractions", BaseUnits.Undefined), - new UnitInfo(RatioUnit.PartPerBillion, "PartsPerBillion", BaseUnits.Undefined), - new UnitInfo(RatioUnit.PartPerMillion, "PartsPerMillion", BaseUnits.Undefined), - new UnitInfo(RatioUnit.PartPerThousand, "PartsPerThousand", BaseUnits.Undefined), - new UnitInfo(RatioUnit.PartPerTrillion, "PartsPerTrillion", BaseUnits.Undefined), - new UnitInfo(RatioUnit.Percent, "Percent", BaseUnits.Undefined), + new UnitInfo(RatioUnit.DecimalFraction, "DecimalFractions", BaseUnits.Undefined, "Ratio"), + new UnitInfo(RatioUnit.PartPerBillion, "PartsPerBillion", BaseUnits.Undefined, "Ratio"), + new UnitInfo(RatioUnit.PartPerMillion, "PartsPerMillion", BaseUnits.Undefined, "Ratio"), + new UnitInfo(RatioUnit.PartPerThousand, "PartsPerThousand", BaseUnits.Undefined, "Ratio"), + new UnitInfo(RatioUnit.PartPerTrillion, "PartsPerTrillion", BaseUnits.Undefined, "Ratio"), + new UnitInfo(RatioUnit.Percent, "Percent", BaseUnits.Undefined, "Ratio"), }, BaseUnit, Zero, BaseDimensions); @@ -232,16 +232,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(RatioUnit.DecimalFraction, RatioUnit.Percent, quantity => quantity.ToUnit(RatioUnit.Percent)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(RatioUnit.DecimalFraction, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(RatioUnit.PartPerBillion, new CultureInfo("en-US"), false, true, new string[]{"ppb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RatioUnit.PartPerMillion, new CultureInfo("en-US"), false, true, new string[]{"ppm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RatioUnit.PartPerThousand, new CultureInfo("en-US"), false, true, new string[]{"‰"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RatioUnit.PartPerTrillion, new CultureInfo("en-US"), false, true, new string[]{"ppt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RatioUnit.Percent, new CultureInfo("en-US"), false, true, new string[]{"%"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs index 6218bbc2a1..ef1eb7bae9 100644 --- a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs @@ -65,8 +65,8 @@ static RatioChangeRate() Info = new QuantityInfo("RatioChangeRate", new UnitInfo[] { - new UnitInfo(RatioChangeRateUnit.DecimalFractionPerSecond, "DecimalFractionsPerSecond", BaseUnits.Undefined), - new UnitInfo(RatioChangeRateUnit.PercentPerSecond, "PercentsPerSecond", BaseUnits.Undefined), + new UnitInfo(RatioChangeRateUnit.DecimalFractionPerSecond, "DecimalFractionsPerSecond", BaseUnits.Undefined, "RatioChangeRate"), + new UnitInfo(RatioChangeRateUnit.PercentPerSecond, "PercentsPerSecond", BaseUnits.Undefined, "RatioChangeRate"), }, BaseUnit, Zero, BaseDimensions); @@ -200,12 +200,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(RatioChangeRateUnit.DecimalFractionPerSecond, RatioChangeRateUnit.PercentPerSecond, quantity => quantity.ToUnit(RatioChangeRateUnit.PercentPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(RatioChangeRateUnit.DecimalFractionPerSecond, new CultureInfo("en-US"), false, true, new string[]{"/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RatioChangeRateUnit.PercentPerSecond, new CultureInfo("en-US"), false, true, new string[]{"%/s"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs index 59930fef92..cc7e3e7e05 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs @@ -65,9 +65,9 @@ static ReactiveEnergy() Info = new QuantityInfo("ReactiveEnergy", new UnitInfo[] { - new UnitInfo(ReactiveEnergyUnit.KilovoltampereReactiveHour, "KilovoltampereReactiveHours", BaseUnits.Undefined), - new UnitInfo(ReactiveEnergyUnit.MegavoltampereReactiveHour, "MegavoltampereReactiveHours", BaseUnits.Undefined), - new UnitInfo(ReactiveEnergyUnit.VoltampereReactiveHour, "VoltampereReactiveHours", BaseUnits.Undefined), + new UnitInfo(ReactiveEnergyUnit.KilovoltampereReactiveHour, "KilovoltampereReactiveHours", BaseUnits.Undefined, "ReactiveEnergy"), + new UnitInfo(ReactiveEnergyUnit.MegavoltampereReactiveHour, "MegavoltampereReactiveHours", BaseUnits.Undefined, "ReactiveEnergy"), + new UnitInfo(ReactiveEnergyUnit.VoltampereReactiveHour, "VoltampereReactiveHours", BaseUnits.Undefined, "ReactiveEnergy"), }, BaseUnit, Zero, BaseDimensions); @@ -208,13 +208,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ReactiveEnergyUnit.VoltampereReactiveHour, ReactiveEnergyUnit.MegavoltampereReactiveHour, quantity => quantity.ToUnit(ReactiveEnergyUnit.MegavoltampereReactiveHour)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ReactiveEnergyUnit.KilovoltampereReactiveHour, new CultureInfo("en-US"), false, true, new string[]{"kvarh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReactiveEnergyUnit.MegavoltampereReactiveHour, new CultureInfo("en-US"), false, true, new string[]{"Mvarh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReactiveEnergyUnit.VoltampereReactiveHour, new CultureInfo("en-US"), false, true, new string[]{"varh"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs index 0f530580e8..dceb64df5d 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs @@ -65,10 +65,10 @@ static ReactivePower() Info = new QuantityInfo("ReactivePower", new UnitInfo[] { - new UnitInfo(ReactivePowerUnit.GigavoltampereReactive, "GigavoltamperesReactive", BaseUnits.Undefined), - new UnitInfo(ReactivePowerUnit.KilovoltampereReactive, "KilovoltamperesReactive", BaseUnits.Undefined), - new UnitInfo(ReactivePowerUnit.MegavoltampereReactive, "MegavoltamperesReactive", BaseUnits.Undefined), - new UnitInfo(ReactivePowerUnit.VoltampereReactive, "VoltamperesReactive", BaseUnits.Undefined), + new UnitInfo(ReactivePowerUnit.GigavoltampereReactive, "GigavoltamperesReactive", BaseUnits.Undefined, "ReactivePower"), + new UnitInfo(ReactivePowerUnit.KilovoltampereReactive, "KilovoltamperesReactive", BaseUnits.Undefined, "ReactivePower"), + new UnitInfo(ReactivePowerUnit.MegavoltampereReactive, "MegavoltamperesReactive", BaseUnits.Undefined, "ReactivePower"), + new UnitInfo(ReactivePowerUnit.VoltampereReactive, "VoltamperesReactive", BaseUnits.Undefined, "ReactivePower"), }, BaseUnit, Zero, BaseDimensions); @@ -216,14 +216,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ReactivePowerUnit.VoltampereReactive, ReactivePowerUnit.MegavoltampereReactive, quantity => quantity.ToUnit(ReactivePowerUnit.MegavoltampereReactive)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ReactivePowerUnit.GigavoltampereReactive, new CultureInfo("en-US"), false, true, new string[]{"Gvar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReactivePowerUnit.KilovoltampereReactive, new CultureInfo("en-US"), false, true, new string[]{"kvar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReactivePowerUnit.MegavoltampereReactive, new CultureInfo("en-US"), false, true, new string[]{"Mvar"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReactivePowerUnit.VoltampereReactive, new CultureInfo("en-US"), false, true, new string[]{"var"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs index e4c4204eec..51723ebbab 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs @@ -68,17 +68,17 @@ static ReciprocalArea() Info = new QuantityInfo("ReciprocalArea", new UnitInfo[] { - new UnitInfo(ReciprocalAreaUnit.InverseSquareCentimeter, "InverseSquareCentimeters", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareDecimeter, "InverseSquareDecimeters", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareFoot, "InverseSquareFeet", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareInch, "InverseSquareInches", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareKilometer, "InverseSquareKilometers", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareMeter, "InverseSquareMeters", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareMicrometer, "InverseSquareMicrometers", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareMile, "InverseSquareMiles", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareMillimeter, "InverseSquareMillimeters", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseSquareYard, "InverseSquareYards", BaseUnits.Undefined), - new UnitInfo(ReciprocalAreaUnit.InverseUsSurveySquareFoot, "InverseUsSurveySquareFeet", BaseUnits.Undefined), + new UnitInfo(ReciprocalAreaUnit.InverseSquareCentimeter, "InverseSquareCentimeters", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareDecimeter, "InverseSquareDecimeters", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareFoot, "InverseSquareFeet", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareInch, "InverseSquareInches", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareKilometer, "InverseSquareKilometers", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareMeter, "InverseSquareMeters", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareMicrometer, "InverseSquareMicrometers", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareMile, "InverseSquareMiles", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareMillimeter, "InverseSquareMillimeters", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseSquareYard, "InverseSquareYards", BaseUnits.Undefined, "ReciprocalArea"), + new UnitInfo(ReciprocalAreaUnit.InverseUsSurveySquareFoot, "InverseUsSurveySquareFeet", BaseUnits.Undefined, "ReciprocalArea"), }, BaseUnit, Zero, BaseDimensions); @@ -275,21 +275,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ReciprocalAreaUnit.InverseSquareMeter, ReciprocalAreaUnit.InverseUsSurveySquareFoot, quantity => quantity.ToUnit(ReciprocalAreaUnit.InverseUsSurveySquareFoot)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareCentimeter, new CultureInfo("en-US"), false, true, new string[]{"cm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareDecimeter, new CultureInfo("en-US"), false, true, new string[]{"dm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"ft⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareInch, new CultureInfo("en-US"), false, true, new string[]{"in⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareKilometer, new CultureInfo("en-US"), false, true, new string[]{"km⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"m⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareMicrometer, new CultureInfo("en-US"), false, true, new string[]{"µm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareMile, new CultureInfo("en-US"), false, true, new string[]{"mi⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mm⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseSquareYard, new CultureInfo("en-US"), false, true, new string[]{"yd⁻²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalAreaUnit.InverseUsSurveySquareFoot, new CultureInfo("en-US"), false, true, new string[]{"ft⁻² (US)"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs index 252b52e59e..9a9e551ca3 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs @@ -68,16 +68,16 @@ static ReciprocalLength() Info = new QuantityInfo("ReciprocalLength", new UnitInfo[] { - new UnitInfo(ReciprocalLengthUnit.InverseCentimeter, "InverseCentimeters", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseFoot, "InverseFeet", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseInch, "InverseInches", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseMeter, "InverseMeters", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseMicroinch, "InverseMicroinches", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseMil, "InverseMils", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseMile, "InverseMiles", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseMillimeter, "InverseMillimeters", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseUsSurveyFoot, "InverseUsSurveyFeet", BaseUnits.Undefined), - new UnitInfo(ReciprocalLengthUnit.InverseYard, "InverseYards", BaseUnits.Undefined), + new UnitInfo(ReciprocalLengthUnit.InverseCentimeter, "InverseCentimeters", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseFoot, "InverseFeet", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseInch, "InverseInches", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseMeter, "InverseMeters", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseMicroinch, "InverseMicroinches", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseMil, "InverseMils", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseMile, "InverseMiles", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseMillimeter, "InverseMillimeters", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseUsSurveyFoot, "InverseUsSurveyFeet", BaseUnits.Undefined, "ReciprocalLength"), + new UnitInfo(ReciprocalLengthUnit.InverseYard, "InverseYards", BaseUnits.Undefined, "ReciprocalLength"), }, BaseUnit, Zero, BaseDimensions); @@ -267,20 +267,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ReciprocalLengthUnit.InverseMeter, ReciprocalLengthUnit.InverseYard, quantity => quantity.ToUnit(ReciprocalLengthUnit.InverseYard)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseCentimeter, new CultureInfo("en-US"), false, true, new string[]{"cm⁻¹", "1/cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseFoot, new CultureInfo("en-US"), false, true, new string[]{"ft⁻¹", "1/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseInch, new CultureInfo("en-US"), false, true, new string[]{"in⁻¹", "1/in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseMeter, new CultureInfo("en-US"), false, true, new string[]{"m⁻¹", "1/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseMicroinch, new CultureInfo("en-US"), false, true, new string[]{"µin⁻¹", "1/µin"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseMil, new CultureInfo("en-US"), false, true, new string[]{"mil⁻¹", "1/mil"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseMile, new CultureInfo("en-US"), false, true, new string[]{"mi⁻¹", "1/mi"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mm⁻¹", "1/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseUsSurveyFoot, new CultureInfo("en-US"), false, true, new string[]{"ftUS⁻¹", "1/ftUS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ReciprocalLengthUnit.InverseYard, new CultureInfo("en-US"), false, true, new string[]{"yd⁻¹", "1/yd"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs index e4ae0327a5..6268effbfe 100644 --- a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs @@ -65,7 +65,7 @@ static RelativeHumidity() Info = new QuantityInfo("RelativeHumidity", new UnitInfo[] { - new UnitInfo(RelativeHumidityUnit.Percent, "Percent", BaseUnits.Undefined), + new UnitInfo(RelativeHumidityUnit.Percent, "Percent", BaseUnits.Undefined, "RelativeHumidity"), }, BaseUnit, Zero, BaseDimensions); @@ -192,11 +192,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> RelativeHumidityUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(RelativeHumidityUnit.Percent, new CultureInfo("en-US"), false, true, new string[]{"%RH"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs index 4104792881..01e61c6230 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs @@ -65,10 +65,10 @@ static RotationalAcceleration() Info = new QuantityInfo("RotationalAcceleration", new UnitInfo[] { - new UnitInfo(RotationalAccelerationUnit.DegreePerSecondSquared, "DegreesPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(RotationalAccelerationUnit.RadianPerSecondSquared, "RadiansPerSecondSquared", BaseUnits.Undefined), - new UnitInfo(RotationalAccelerationUnit.RevolutionPerMinutePerSecond, "RevolutionsPerMinutePerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalAccelerationUnit.RevolutionPerSecondSquared, "RevolutionsPerSecondSquared", BaseUnits.Undefined), + new UnitInfo(RotationalAccelerationUnit.DegreePerSecondSquared, "DegreesPerSecondSquared", BaseUnits.Undefined, "RotationalAcceleration"), + new UnitInfo(RotationalAccelerationUnit.RadianPerSecondSquared, "RadiansPerSecondSquared", BaseUnits.Undefined, "RotationalAcceleration"), + new UnitInfo(RotationalAccelerationUnit.RevolutionPerMinutePerSecond, "RevolutionsPerMinutePerSecond", BaseUnits.Undefined, "RotationalAcceleration"), + new UnitInfo(RotationalAccelerationUnit.RevolutionPerSecondSquared, "RevolutionsPerSecondSquared", BaseUnits.Undefined, "RotationalAcceleration"), }, BaseUnit, Zero, BaseDimensions); @@ -216,14 +216,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(RotationalAccelerationUnit.RadianPerSecondSquared, RotationalAccelerationUnit.RevolutionPerSecondSquared, quantity => quantity.ToUnit(RotationalAccelerationUnit.RevolutionPerSecondSquared)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalAccelerationUnit.DegreePerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"°/s²", "deg/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalAccelerationUnit.RadianPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"rad/s²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalAccelerationUnit.RevolutionPerMinutePerSecond, new CultureInfo("en-US"), false, true, new string[]{"rpm/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalAccelerationUnit.RevolutionPerSecondSquared, new CultureInfo("en-US"), false, true, new string[]{"r/s²"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs index 5ac639715b..8c16fff19b 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs @@ -65,19 +65,19 @@ static RotationalSpeed() Info = new QuantityInfo("RotationalSpeed", new UnitInfo[] { - new UnitInfo(RotationalSpeedUnit.CentiradianPerSecond, "CentiradiansPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.DeciradianPerSecond, "DeciradiansPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.DegreePerMinute, "DegreesPerMinute", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.DegreePerSecond, "DegreesPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.MicrodegreePerSecond, "MicrodegreesPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.MicroradianPerSecond, "MicroradiansPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.MillidegreePerSecond, "MillidegreesPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.MilliradianPerSecond, "MilliradiansPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.NanodegreePerSecond, "NanodegreesPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.NanoradianPerSecond, "NanoradiansPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.RadianPerSecond, "RadiansPerSecond", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.RevolutionPerMinute, "RevolutionsPerMinute", BaseUnits.Undefined), - new UnitInfo(RotationalSpeedUnit.RevolutionPerSecond, "RevolutionsPerSecond", BaseUnits.Undefined), + new UnitInfo(RotationalSpeedUnit.CentiradianPerSecond, "CentiradiansPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.DeciradianPerSecond, "DeciradiansPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.DegreePerMinute, "DegreesPerMinute", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.DegreePerSecond, "DegreesPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.MicrodegreePerSecond, "MicrodegreesPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.MicroradianPerSecond, "MicroradiansPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.MillidegreePerSecond, "MillidegreesPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.MilliradianPerSecond, "MilliradiansPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.NanodegreePerSecond, "NanodegreesPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.NanoradianPerSecond, "NanoradiansPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.RadianPerSecond, "RadiansPerSecond", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.RevolutionPerMinute, "RevolutionsPerMinute", BaseUnits.Undefined, "RotationalSpeed"), + new UnitInfo(RotationalSpeedUnit.RevolutionPerSecond, "RevolutionsPerSecond", BaseUnits.Undefined, "RotationalSpeed"), }, BaseUnit, Zero, BaseDimensions); @@ -288,35 +288,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(RotationalSpeedUnit.RadianPerSecond, RotationalSpeedUnit.RevolutionPerSecond, quantity => quantity.ToUnit(RotationalSpeedUnit.RevolutionPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.CentiradianPerSecond, new CultureInfo("en-US"), false, true, new string[]{"crad/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.CentiradianPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"срад/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.DeciradianPerSecond, new CultureInfo("en-US"), false, true, new string[]{"drad/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.DeciradianPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"драд/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.DegreePerMinute, new CultureInfo("en-US"), false, true, new string[]{"°/min", "deg/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.DegreePerSecond, new CultureInfo("en-US"), false, true, new string[]{"°/s", "deg/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.DegreePerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"°/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MicrodegreePerSecond, new CultureInfo("en-US"), false, true, new string[]{"µ°/s", "µdeg/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MicrodegreePerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мк°/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MicroradianPerSecond, new CultureInfo("en-US"), false, true, new string[]{"µrad/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MicroradianPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мкрад/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MillidegreePerSecond, new CultureInfo("en-US"), false, true, new string[]{"m°/s", "mdeg/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MillidegreePerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"м°/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MilliradianPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mrad/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.MilliradianPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мрад/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.NanodegreePerSecond, new CultureInfo("en-US"), false, true, new string[]{"n°/s", "ndeg/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.NanodegreePerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"н°/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.NanoradianPerSecond, new CultureInfo("en-US"), false, true, new string[]{"nrad/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.NanoradianPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"нрад/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.RadianPerSecond, new CultureInfo("en-US"), false, true, new string[]{"rad/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.RadianPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"рад/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.RevolutionPerMinute, new CultureInfo("en-US"), false, true, new string[]{"rpm", "r/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.RevolutionPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"об/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.RevolutionPerSecond, new CultureInfo("en-US"), false, true, new string[]{"r/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalSpeedUnit.RevolutionPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"об/с"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs index 7946dbf28c..fce42cd7aa 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs @@ -65,39 +65,39 @@ static RotationalStiffness() Info = new QuantityInfo("RotationalStiffness", new UnitInfo[] { - new UnitInfo(RotationalStiffnessUnit.CentinewtonMeterPerDegree, "CentinewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.CentinewtonMillimeterPerDegree, "CentinewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.CentinewtonMillimeterPerRadian, "CentinewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.DecanewtonMeterPerDegree, "DecanewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.DecanewtonMillimeterPerDegree, "DecanewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.DecanewtonMillimeterPerRadian, "DecanewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.DecinewtonMeterPerDegree, "DecinewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.DecinewtonMillimeterPerDegree, "DecinewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.DecinewtonMillimeterPerRadian, "DecinewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.KilonewtonMeterPerDegree, "KilonewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.KilonewtonMeterPerRadian, "KilonewtonMetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.KilonewtonMillimeterPerDegree, "KilonewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.KilonewtonMillimeterPerRadian, "KilonewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.KilopoundForceFootPerDegrees, "KilopoundForceFeetPerDegrees", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MeganewtonMeterPerDegree, "MeganewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MeganewtonMeterPerRadian, "MeganewtonMetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MeganewtonMillimeterPerDegree, "MeganewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MeganewtonMillimeterPerRadian, "MeganewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MicronewtonMeterPerDegree, "MicronewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MicronewtonMillimeterPerDegree, "MicronewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MicronewtonMillimeterPerRadian, "MicronewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MillinewtonMeterPerDegree, "MillinewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MillinewtonMillimeterPerDegree, "MillinewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.MillinewtonMillimeterPerRadian, "MillinewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.NanonewtonMeterPerDegree, "NanonewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.NanonewtonMillimeterPerDegree, "NanonewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.NanonewtonMillimeterPerRadian, "NanonewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.NewtonMeterPerDegree, "NewtonMetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.NewtonMeterPerRadian, "NewtonMetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.NewtonMillimeterPerDegree, "NewtonMillimetersPerDegree", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.NewtonMillimeterPerRadian, "NewtonMillimetersPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.PoundForceFeetPerRadian, "PoundForceFeetPerRadian", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessUnit.PoundForceFootPerDegrees, "PoundForceFeetPerDegrees", BaseUnits.Undefined), + new UnitInfo(RotationalStiffnessUnit.CentinewtonMeterPerDegree, "CentinewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.CentinewtonMillimeterPerDegree, "CentinewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.CentinewtonMillimeterPerRadian, "CentinewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.DecanewtonMeterPerDegree, "DecanewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.DecanewtonMillimeterPerDegree, "DecanewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.DecanewtonMillimeterPerRadian, "DecanewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.DecinewtonMeterPerDegree, "DecinewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.DecinewtonMillimeterPerDegree, "DecinewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.DecinewtonMillimeterPerRadian, "DecinewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.KilonewtonMeterPerDegree, "KilonewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.KilonewtonMeterPerRadian, "KilonewtonMetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.KilonewtonMillimeterPerDegree, "KilonewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.KilonewtonMillimeterPerRadian, "KilonewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.KilopoundForceFootPerDegrees, "KilopoundForceFeetPerDegrees", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MeganewtonMeterPerDegree, "MeganewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MeganewtonMeterPerRadian, "MeganewtonMetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MeganewtonMillimeterPerDegree, "MeganewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MeganewtonMillimeterPerRadian, "MeganewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MicronewtonMeterPerDegree, "MicronewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MicronewtonMillimeterPerDegree, "MicronewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MicronewtonMillimeterPerRadian, "MicronewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MillinewtonMeterPerDegree, "MillinewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MillinewtonMillimeterPerDegree, "MillinewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.MillinewtonMillimeterPerRadian, "MillinewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.NanonewtonMeterPerDegree, "NanonewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.NanonewtonMillimeterPerDegree, "NanonewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.NanonewtonMillimeterPerRadian, "NanonewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.NewtonMeterPerDegree, "NewtonMetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.NewtonMeterPerRadian, "NewtonMetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.NewtonMillimeterPerDegree, "NewtonMillimetersPerDegree", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.NewtonMillimeterPerRadian, "NewtonMillimetersPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.PoundForceFeetPerRadian, "PoundForceFeetPerRadian", BaseUnits.Undefined, "RotationalStiffness"), + new UnitInfo(RotationalStiffnessUnit.PoundForceFootPerDegrees, "PoundForceFeetPerDegrees", BaseUnits.Undefined, "RotationalStiffness"), }, BaseUnit, Zero, BaseDimensions); @@ -448,43 +448,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(RotationalStiffnessUnit.NewtonMeterPerRadian, RotationalStiffnessUnit.PoundForceFootPerDegrees, quantity => quantity.ToUnit(RotationalStiffnessUnit.PoundForceFootPerDegrees)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.CentinewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"cN·m/deg", "cNm/deg", "cN·m/°", "cNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.CentinewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"cN·mm/deg", "cNmm/deg", "cN·mm/°", "cNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.CentinewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"cN·mm/rad", "cNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.DecanewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"daN·m/deg", "daNm/deg", "daN·m/°", "daNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.DecanewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"daN·mm/deg", "daNmm/deg", "daN·mm/°", "daNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.DecanewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"daN·mm/rad", "daNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.DecinewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"dN·m/deg", "dNm/deg", "dN·m/°", "dNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.DecinewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"dN·mm/deg", "dNmm/deg", "dN·mm/°", "dNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.DecinewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"dN·mm/rad", "dNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.KilonewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"kN·m/deg", "kNm/deg", "kN·m/°", "kNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.KilonewtonMeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"kN·m/rad", "kNm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.KilonewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"kN·mm/deg", "kNmm/deg", "kN·mm/°", "kNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.KilonewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"kN·mm/rad", "kNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.KilopoundForceFootPerDegrees, new CultureInfo("en-US"), false, true, new string[]{"kipf·ft/°", "kip·ft/°g", "k·ft/°", "kipf·ft/deg", "kip·ft/deg", "k·ft/deg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MeganewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"MN·m/deg", "MNm/deg", "MN·m/°", "MNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MeganewtonMeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"MN·m/rad", "MNm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MeganewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"MN·mm/deg", "MNmm/deg", "MN·mm/°", "MNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MeganewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"MN·mm/rad", "MNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MicronewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"µN·m/deg", "µNm/deg", "µN·m/°", "µNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MicronewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"µN·mm/deg", "µNmm/deg", "µN·mm/°", "µNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MicronewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"µN·mm/rad", "µNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MillinewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"mN·m/deg", "mNm/deg", "mN·m/°", "mNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MillinewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"mN·mm/deg", "mNmm/deg", "mN·mm/°", "mNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.MillinewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"mN·mm/rad", "mNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.NanonewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"nN·m/deg", "nNm/deg", "nN·m/°", "nNm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.NanonewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"nN·mm/deg", "nNmm/deg", "nN·mm/°", "nNmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.NanonewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"nN·mm/rad", "nNmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.NewtonMeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"N·m/deg", "Nm/deg", "N·m/°", "Nm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.NewtonMeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"N·m/rad", "Nm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.NewtonMillimeterPerDegree, new CultureInfo("en-US"), false, true, new string[]{"N·mm/deg", "Nmm/deg", "N·mm/°", "Nmm/°"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.NewtonMillimeterPerRadian, new CultureInfo("en-US"), false, true, new string[]{"N·mm/rad", "Nmm/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.PoundForceFeetPerRadian, new CultureInfo("en-US"), false, true, new string[]{"lbf·ft/rad"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessUnit.PoundForceFootPerDegrees, new CultureInfo("en-US"), false, true, new string[]{"lbf·ft/deg"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs index b1735ce0b8..aca3dd418f 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs @@ -65,11 +65,11 @@ static RotationalStiffnessPerLength() Info = new QuantityInfo("RotationalStiffnessPerLength", new UnitInfo[] { - new UnitInfo(RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter, "KilonewtonMetersPerRadianPerMeter", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, "KilopoundForceFeetPerDegreesPerFeet", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, "MeganewtonMetersPerRadianPerMeter", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, "NewtonMetersPerRadianPerMeter", BaseUnits.Undefined), - new UnitInfo(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, "PoundForceFeetPerDegreesPerFeet", BaseUnits.Undefined), + new UnitInfo(RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter, "KilonewtonMetersPerRadianPerMeter", BaseUnits.Undefined, "RotationalStiffnessPerLength"), + new UnitInfo(RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, "KilopoundForceFeetPerDegreesPerFeet", BaseUnits.Undefined, "RotationalStiffnessPerLength"), + new UnitInfo(RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, "MeganewtonMetersPerRadianPerMeter", BaseUnits.Undefined, "RotationalStiffnessPerLength"), + new UnitInfo(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, "NewtonMetersPerRadianPerMeter", BaseUnits.Undefined, "RotationalStiffnessPerLength"), + new UnitInfo(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, "PoundForceFeetPerDegreesPerFeet", BaseUnits.Undefined, "RotationalStiffnessPerLength"), }, BaseUnit, Zero, BaseDimensions); @@ -224,15 +224,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, quantity => quantity.ToUnit(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kN·m/rad/m", "kNm/rad/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot, new CultureInfo("en-US"), false, true, new string[]{"kipf·ft/°/ft", "kip·ft/°/ft", "k·ft/°/ft", "kipf·ft/deg/ft", "kip·ft/deg/ft", "k·ft/deg/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter, new CultureInfo("en-US"), false, true, new string[]{"MN·m/rad/m", "MNm/rad/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter, new CultureInfo("en-US"), false, true, new string[]{"N·m/rad/m", "Nm/rad/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot, new CultureInfo("en-US"), false, true, new string[]{"lbf·ft/deg/ft"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs index 375740fe5c..8fdb41d20e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs @@ -65,7 +65,7 @@ static Scalar() Info = new QuantityInfo("Scalar", new UnitInfo[] { - new UnitInfo(ScalarUnit.Amount, "Amount", BaseUnits.Undefined), + new UnitInfo(ScalarUnit.Amount, "Amount", BaseUnits.Undefined, "Scalar"), }, BaseUnit, Zero, BaseDimensions); @@ -192,11 +192,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> ScalarUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ScalarUnit.Amount, new CultureInfo("en-US"), false, true, new string[]{""}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs index 05e620b8c6..7f1079b755 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs @@ -68,7 +68,7 @@ static SolidAngle() Info = new QuantityInfo("SolidAngle", new UnitInfo[] { - new UnitInfo(SolidAngleUnit.Steradian, "Steradians", BaseUnits.Undefined), + new UnitInfo(SolidAngleUnit.Steradian, "Steradians", BaseUnits.Undefined, "SolidAngle"), }, BaseUnit, Zero, BaseDimensions); @@ -195,11 +195,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> SolidAngleUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(SolidAngleUnit.Steradian, new CultureInfo("en-US"), false, true, new string[]{"sr"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs index 46fe41bc7f..36de3b5cbd 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs @@ -68,36 +68,36 @@ static SpecificEnergy() Info = new QuantityInfo("SpecificEnergy", new UnitInfo[] { - new UnitInfo(SpecificEnergyUnit.BtuPerPound, "BtuPerPound", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.CaloriePerGram, "CaloriesPerGram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.GigawattDayPerKilogram, "GigawattDaysPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.GigawattDayPerShortTon, "GigawattDaysPerShortTon", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.GigawattDayPerTonne, "GigawattDaysPerTonne", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.GigawattHourPerKilogram, "GigawattHoursPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.GigawattHourPerPound, "GigawattHoursPerPound", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.JoulePerKilogram, "JoulesPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.KilocaloriePerGram, "KilocaloriesPerGram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.KilojoulePerKilogram, "KilojoulesPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.KilowattDayPerKilogram, "KilowattDaysPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.KilowattDayPerShortTon, "KilowattDaysPerShortTon", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.KilowattDayPerTonne, "KilowattDaysPerTonne", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.KilowattHourPerKilogram, "KilowattHoursPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.KilowattHourPerPound, "KilowattHoursPerPound", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.MegajoulePerKilogram, "MegajoulesPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.MegaJoulePerTonne, "MegaJoulesPerTonne", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.MegawattDayPerKilogram, "MegawattDaysPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.MegawattDayPerShortTon, "MegawattDaysPerShortTon", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.MegawattDayPerTonne, "MegawattDaysPerTonne", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.MegawattHourPerKilogram, "MegawattHoursPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.MegawattHourPerPound, "MegawattHoursPerPound", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.TerawattDayPerKilogram, "TerawattDaysPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.TerawattDayPerShortTon, "TerawattDaysPerShortTon", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.TerawattDayPerTonne, "TerawattDaysPerTonne", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.WattDayPerKilogram, "WattDaysPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.WattDayPerShortTon, "WattDaysPerShortTon", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.WattDayPerTonne, "WattDaysPerTonne", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.WattHourPerKilogram, "WattHoursPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificEnergyUnit.WattHourPerPound, "WattHoursPerPound", BaseUnits.Undefined), + new UnitInfo(SpecificEnergyUnit.BtuPerPound, "BtuPerPound", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.CaloriePerGram, "CaloriesPerGram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.GigawattDayPerKilogram, "GigawattDaysPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.GigawattDayPerShortTon, "GigawattDaysPerShortTon", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.GigawattDayPerTonne, "GigawattDaysPerTonne", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.GigawattHourPerKilogram, "GigawattHoursPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.GigawattHourPerPound, "GigawattHoursPerPound", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.JoulePerKilogram, "JoulesPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.KilocaloriePerGram, "KilocaloriesPerGram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.KilojoulePerKilogram, "KilojoulesPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.KilowattDayPerKilogram, "KilowattDaysPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.KilowattDayPerShortTon, "KilowattDaysPerShortTon", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.KilowattDayPerTonne, "KilowattDaysPerTonne", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.KilowattHourPerKilogram, "KilowattHoursPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.KilowattHourPerPound, "KilowattHoursPerPound", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.MegajoulePerKilogram, "MegajoulesPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.MegaJoulePerTonne, "MegaJoulesPerTonne", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.MegawattDayPerKilogram, "MegawattDaysPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.MegawattDayPerShortTon, "MegawattDaysPerShortTon", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.MegawattDayPerTonne, "MegawattDaysPerTonne", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.MegawattHourPerKilogram, "MegawattHoursPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.MegawattHourPerPound, "MegawattHoursPerPound", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.TerawattDayPerKilogram, "TerawattDaysPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.TerawattDayPerShortTon, "TerawattDaysPerShortTon", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.TerawattDayPerTonne, "TerawattDaysPerTonne", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.WattDayPerKilogram, "WattDaysPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.WattDayPerShortTon, "WattDaysPerShortTon", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.WattDayPerTonne, "WattDaysPerTonne", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.WattHourPerKilogram, "WattHoursPerKilogram", BaseUnits.Undefined, "SpecificEnergy"), + new UnitInfo(SpecificEnergyUnit.WattHourPerPound, "WattHoursPerPound", BaseUnits.Undefined, "SpecificEnergy"), }, BaseUnit, Zero, BaseDimensions); @@ -427,40 +427,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(SpecificEnergyUnit.JoulePerKilogram, SpecificEnergyUnit.WattHourPerPound, quantity => quantity.ToUnit(SpecificEnergyUnit.WattHourPerPound)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.BtuPerPound, new CultureInfo("en-US"), false, true, new string[]{"btu/lb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.CaloriePerGram, new CultureInfo("en-US"), false, true, new string[]{"cal/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.GigawattDayPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"GWd/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.GigawattDayPerShortTon, new CultureInfo("en-US"), false, true, new string[]{"GWd/ST"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.GigawattDayPerTonne, new CultureInfo("en-US"), false, true, new string[]{"GWd/t"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.GigawattHourPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"GWh/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.GigawattHourPerPound, new CultureInfo("en-US"), false, true, new string[]{"GWh/lbs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.JoulePerKilogram, new CultureInfo("en-US"), false, true, new string[]{"J/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.KilocaloriePerGram, new CultureInfo("en-US"), false, true, new string[]{"kcal/g"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.KilojoulePerKilogram, new CultureInfo("en-US"), false, true, new string[]{"kJ/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.KilowattDayPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"kWd/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.KilowattDayPerShortTon, new CultureInfo("en-US"), false, true, new string[]{"kWd/ST"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.KilowattDayPerTonne, new CultureInfo("en-US"), false, true, new string[]{"kWd/t"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.KilowattHourPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"kWh/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.KilowattHourPerPound, new CultureInfo("en-US"), false, true, new string[]{"kWh/lbs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.MegajoulePerKilogram, new CultureInfo("en-US"), false, true, new string[]{"MJ/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.MegaJoulePerTonne, new CultureInfo("en-US"), false, true, new string[]{"MJ/t"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.MegawattDayPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"MWd/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.MegawattDayPerShortTon, new CultureInfo("en-US"), false, true, new string[]{"MWd/ST"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.MegawattDayPerTonne, new CultureInfo("en-US"), false, true, new string[]{"MWd/t"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.MegawattHourPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"MWh/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.MegawattHourPerPound, new CultureInfo("en-US"), false, true, new string[]{"MWh/lbs"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.TerawattDayPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"TWd/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.TerawattDayPerShortTon, new CultureInfo("en-US"), false, true, new string[]{"TWd/ST"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.TerawattDayPerTonne, new CultureInfo("en-US"), false, true, new string[]{"TWd/t"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.WattDayPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"Wd/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.WattDayPerShortTon, new CultureInfo("en-US"), false, true, new string[]{"Wd/ST"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.WattDayPerTonne, new CultureInfo("en-US"), false, true, new string[]{"Wd/t"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.WattHourPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"Wh/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEnergyUnit.WattHourPerPound, new CultureInfo("en-US"), false, true, new string[]{"Wh/lbs"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs index e83e66dae4..fc29ea8424 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs @@ -65,15 +65,15 @@ static SpecificEntropy() Info = new QuantityInfo("SpecificEntropy", new UnitInfo[] { - new UnitInfo(SpecificEntropyUnit.BtuPerPoundFahrenheit, "BtusPerPoundFahrenheit", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.CaloriePerGramKelvin, "CaloriesPerGramKelvin", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.JoulePerKilogramDegreeCelsius, "JoulesPerKilogramDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.JoulePerKilogramKelvin, "JoulesPerKilogramKelvin", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.KilocaloriePerGramKelvin, "KilocaloriesPerGramKelvin", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.KilojoulePerKilogramDegreeCelsius, "KilojoulesPerKilogramDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.KilojoulePerKilogramKelvin, "KilojoulesPerKilogramKelvin", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius, "MegajoulesPerKilogramDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(SpecificEntropyUnit.MegajoulePerKilogramKelvin, "MegajoulesPerKilogramKelvin", BaseUnits.Undefined), + new UnitInfo(SpecificEntropyUnit.BtuPerPoundFahrenheit, "BtusPerPoundFahrenheit", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.CaloriePerGramKelvin, "CaloriesPerGramKelvin", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.JoulePerKilogramDegreeCelsius, "JoulesPerKilogramDegreeCelsius", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.JoulePerKilogramKelvin, "JoulesPerKilogramKelvin", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.KilocaloriePerGramKelvin, "KilocaloriesPerGramKelvin", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.KilojoulePerKilogramDegreeCelsius, "KilojoulesPerKilogramDegreeCelsius", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.KilojoulePerKilogramKelvin, "KilojoulesPerKilogramKelvin", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius, "MegajoulesPerKilogramDegreeCelsius", BaseUnits.Undefined, "SpecificEntropy"), + new UnitInfo(SpecificEntropyUnit.MegajoulePerKilogramKelvin, "MegajoulesPerKilogramKelvin", BaseUnits.Undefined, "SpecificEntropy"), }, BaseUnit, Zero, BaseDimensions); @@ -256,19 +256,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(SpecificEntropyUnit.JoulePerKilogramKelvin, SpecificEntropyUnit.MegajoulePerKilogramKelvin, quantity => quantity.ToUnit(SpecificEntropyUnit.MegajoulePerKilogramKelvin)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.BtuPerPoundFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"BTU/lb·°F", "BTU/lbm·°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.CaloriePerGramKelvin, new CultureInfo("en-US"), false, true, new string[]{"cal/g.K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.JoulePerKilogramDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"J/kg.C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.JoulePerKilogramKelvin, new CultureInfo("en-US"), false, true, new string[]{"J/kg.K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.KilocaloriePerGramKelvin, new CultureInfo("en-US"), false, true, new string[]{"kcal/g.K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.KilojoulePerKilogramDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"kJ/kg.C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.KilojoulePerKilogramKelvin, new CultureInfo("en-US"), false, true, new string[]{"kJ/kg.K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"MJ/kg.C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificEntropyUnit.MegajoulePerKilogramKelvin, new CultureInfo("en-US"), false, true, new string[]{"MJ/kg.K"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs index 18e8e24d04..128a0157b6 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs @@ -68,10 +68,10 @@ static SpecificFuelConsumption() Info = new QuantityInfo("SpecificFuelConsumption", new UnitInfo[] { - new UnitInfo(SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond, "GramsPerKiloNewtonSecond", BaseUnits.Undefined), - new UnitInfo(SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour, "KilogramsPerKilogramForceHour", BaseUnits.Undefined), - new UnitInfo(SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond, "KilogramsPerKiloNewtonSecond", BaseUnits.Undefined), - new UnitInfo(SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour, "PoundsMassPerPoundForceHour", BaseUnits.Undefined), + new UnitInfo(SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond, "GramsPerKiloNewtonSecond", BaseUnits.Undefined, "SpecificFuelConsumption"), + new UnitInfo(SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour, "KilogramsPerKilogramForceHour", BaseUnits.Undefined, "SpecificFuelConsumption"), + new UnitInfo(SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond, "KilogramsPerKiloNewtonSecond", BaseUnits.Undefined, "SpecificFuelConsumption"), + new UnitInfo(SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour, "PoundsMassPerPoundForceHour", BaseUnits.Undefined, "SpecificFuelConsumption"), }, BaseUnit, Zero, BaseDimensions); @@ -219,14 +219,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond, SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour, quantity => quantity.ToUnit(SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"g/(kN�s)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour, new CultureInfo("en-US"), false, true, new string[]{"kg/(kgf�h)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond, new CultureInfo("en-US"), false, true, new string[]{"kg/(kN�s)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour, new CultureInfo("en-US"), false, true, new string[]{"lb/(lbf·h)"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs index b59b7621c1..b85b4b6363 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs @@ -65,9 +65,9 @@ static SpecificVolume() Info = new QuantityInfo("SpecificVolume", new UnitInfo[] { - new UnitInfo(SpecificVolumeUnit.CubicFootPerPound, "CubicFeetPerPound", BaseUnits.Undefined), - new UnitInfo(SpecificVolumeUnit.CubicMeterPerKilogram, "CubicMetersPerKilogram", BaseUnits.Undefined), - new UnitInfo(SpecificVolumeUnit.MillicubicMeterPerKilogram, "MillicubicMetersPerKilogram", BaseUnits.Undefined), + new UnitInfo(SpecificVolumeUnit.CubicFootPerPound, "CubicFeetPerPound", BaseUnits.Undefined, "SpecificVolume"), + new UnitInfo(SpecificVolumeUnit.CubicMeterPerKilogram, "CubicMetersPerKilogram", BaseUnits.Undefined, "SpecificVolume"), + new UnitInfo(SpecificVolumeUnit.MillicubicMeterPerKilogram, "MillicubicMetersPerKilogram", BaseUnits.Undefined, "SpecificVolume"), }, BaseUnit, Zero, BaseDimensions); @@ -208,13 +208,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(SpecificVolumeUnit.CubicMeterPerKilogram, SpecificVolumeUnit.MillicubicMeterPerKilogram, quantity => quantity.ToUnit(SpecificVolumeUnit.MillicubicMeterPerKilogram)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificVolumeUnit.CubicFootPerPound, new CultureInfo("en-US"), false, true, new string[]{"ft³/lb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificVolumeUnit.CubicMeterPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"m³/kg"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificVolumeUnit.MillicubicMeterPerKilogram, new CultureInfo("en-US"), false, true, new string[]{"mm³/kg"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs index 4f378ea920..1a84158b65 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs @@ -68,23 +68,23 @@ static SpecificWeight() Info = new QuantityInfo("SpecificWeight", new UnitInfo[] { - new UnitInfo(SpecificWeightUnit.KilogramForcePerCubicCentimeter, "KilogramsForcePerCubicCentimeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.KilogramForcePerCubicMeter, "KilogramsForcePerCubicMeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.KilogramForcePerCubicMillimeter, "KilogramsForcePerCubicMillimeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.KilonewtonPerCubicCentimeter, "KilonewtonsPerCubicCentimeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.KilonewtonPerCubicMeter, "KilonewtonsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.KilonewtonPerCubicMillimeter, "KilonewtonsPerCubicMillimeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.KilopoundForcePerCubicFoot, "KilopoundsForcePerCubicFoot", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.KilopoundForcePerCubicInch, "KilopoundsForcePerCubicInch", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.MeganewtonPerCubicMeter, "MeganewtonsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.NewtonPerCubicCentimeter, "NewtonsPerCubicCentimeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.NewtonPerCubicMeter, "NewtonsPerCubicMeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.NewtonPerCubicMillimeter, "NewtonsPerCubicMillimeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.PoundForcePerCubicFoot, "PoundsForcePerCubicFoot", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.PoundForcePerCubicInch, "PoundsForcePerCubicInch", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.TonneForcePerCubicCentimeter, "TonnesForcePerCubicCentimeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.TonneForcePerCubicMeter, "TonnesForcePerCubicMeter", BaseUnits.Undefined), - new UnitInfo(SpecificWeightUnit.TonneForcePerCubicMillimeter, "TonnesForcePerCubicMillimeter", BaseUnits.Undefined), + new UnitInfo(SpecificWeightUnit.KilogramForcePerCubicCentimeter, "KilogramsForcePerCubicCentimeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.KilogramForcePerCubicMeter, "KilogramsForcePerCubicMeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.KilogramForcePerCubicMillimeter, "KilogramsForcePerCubicMillimeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.KilonewtonPerCubicCentimeter, "KilonewtonsPerCubicCentimeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.KilonewtonPerCubicMeter, "KilonewtonsPerCubicMeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.KilonewtonPerCubicMillimeter, "KilonewtonsPerCubicMillimeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.KilopoundForcePerCubicFoot, "KilopoundsForcePerCubicFoot", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.KilopoundForcePerCubicInch, "KilopoundsForcePerCubicInch", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.MeganewtonPerCubicMeter, "MeganewtonsPerCubicMeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.NewtonPerCubicCentimeter, "NewtonsPerCubicCentimeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.NewtonPerCubicMeter, "NewtonsPerCubicMeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.NewtonPerCubicMillimeter, "NewtonsPerCubicMillimeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.PoundForcePerCubicFoot, "PoundsForcePerCubicFoot", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.PoundForcePerCubicInch, "PoundsForcePerCubicInch", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.TonneForcePerCubicCentimeter, "TonnesForcePerCubicCentimeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.TonneForcePerCubicMeter, "TonnesForcePerCubicMeter", BaseUnits.Undefined, "SpecificWeight"), + new UnitInfo(SpecificWeightUnit.TonneForcePerCubicMillimeter, "TonnesForcePerCubicMillimeter", BaseUnits.Undefined, "SpecificWeight"), }, BaseUnit, Zero, BaseDimensions); @@ -323,27 +323,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(SpecificWeightUnit.NewtonPerCubicMeter, SpecificWeightUnit.TonneForcePerCubicMillimeter, quantity => quantity.ToUnit(SpecificWeightUnit.TonneForcePerCubicMillimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilogramForcePerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilogramForcePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilogramForcePerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilonewtonPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kN/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilonewtonPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"kN/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilonewtonPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kN/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilopoundForcePerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"kipf/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.KilopoundForcePerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"kipf/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.MeganewtonPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"MN/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.NewtonPerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"N/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.NewtonPerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"N/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.NewtonPerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"N/mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.PoundForcePerCubicFoot, new CultureInfo("en-US"), false, true, new string[]{"lbf/ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.PoundForcePerCubicInch, new CultureInfo("en-US"), false, true, new string[]{"lbf/in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.TonneForcePerCubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"tf/cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.TonneForcePerCubicMeter, new CultureInfo("en-US"), false, true, new string[]{"tf/m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpecificWeightUnit.TonneForcePerCubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"tf/mm³"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs index 9fe30f34df..dbdda4e8d9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs @@ -65,39 +65,39 @@ static Speed() Info = new QuantityInfo("Speed", new UnitInfo[] { - new UnitInfo(SpeedUnit.CentimeterPerHour, "CentimetersPerHour", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.CentimeterPerMinute, "CentimetersPerMinutes", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.CentimeterPerSecond, "CentimetersPerSecond", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.DecimeterPerMinute, "DecimetersPerMinutes", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.DecimeterPerSecond, "DecimetersPerSecond", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.FootPerHour, "FeetPerHour", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Hour)), - new UnitInfo(SpeedUnit.FootPerMinute, "FeetPerMinute", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Minute)), - new UnitInfo(SpeedUnit.FootPerSecond, "FeetPerSecond", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Second)), - new UnitInfo(SpeedUnit.InchPerHour, "InchesPerHour", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Hour)), - new UnitInfo(SpeedUnit.InchPerMinute, "InchesPerMinute", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Minute)), - new UnitInfo(SpeedUnit.InchPerSecond, "InchesPerSecond", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second)), - new UnitInfo(SpeedUnit.KilometerPerHour, "KilometersPerHour", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.KilometerPerMinute, "KilometersPerMinutes", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.KilometerPerSecond, "KilometersPerSecond", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.Knot, "Knots", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Hour)), - new UnitInfo(SpeedUnit.Mach, "Mach", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.MeterPerHour, "MetersPerHour", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Hour)), - new UnitInfo(SpeedUnit.MeterPerMinute, "MetersPerMinutes", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Minute)), - new UnitInfo(SpeedUnit.MeterPerSecond, "MetersPerSecond", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second)), - new UnitInfo(SpeedUnit.MicrometerPerMinute, "MicrometersPerMinutes", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.MicrometerPerSecond, "MicrometersPerSecond", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.MilePerHour, "MilesPerHour", new BaseUnits(length: LengthUnit.Mile, time: DurationUnit.Hour)), - new UnitInfo(SpeedUnit.MillimeterPerHour, "MillimetersPerHour", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.MillimeterPerMinute, "MillimetersPerMinutes", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.MillimeterPerSecond, "MillimetersPerSecond", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.NanometerPerMinute, "NanometersPerMinutes", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.NanometerPerSecond, "NanometersPerSecond", BaseUnits.Undefined), - new UnitInfo(SpeedUnit.UsSurveyFootPerHour, "UsSurveyFeetPerHour", new BaseUnits(length: LengthUnit.UsSurveyFoot, time: DurationUnit.Hour)), - new UnitInfo(SpeedUnit.UsSurveyFootPerMinute, "UsSurveyFeetPerMinute", new BaseUnits(length: LengthUnit.UsSurveyFoot, time: DurationUnit.Minute)), - new UnitInfo(SpeedUnit.UsSurveyFootPerSecond, "UsSurveyFeetPerSecond", new BaseUnits(length: LengthUnit.UsSurveyFoot, time: DurationUnit.Second)), - new UnitInfo(SpeedUnit.YardPerHour, "YardsPerHour", new BaseUnits(length: LengthUnit.Yard, time: DurationUnit.Hour)), - new UnitInfo(SpeedUnit.YardPerMinute, "YardsPerMinute", new BaseUnits(length: LengthUnit.Yard, time: DurationUnit.Minute)), - new UnitInfo(SpeedUnit.YardPerSecond, "YardsPerSecond", new BaseUnits(length: LengthUnit.Yard, time: DurationUnit.Second)), + new UnitInfo(SpeedUnit.CentimeterPerHour, "CentimetersPerHour", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.CentimeterPerMinute, "CentimetersPerMinutes", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.CentimeterPerSecond, "CentimetersPerSecond", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.DecimeterPerMinute, "DecimetersPerMinutes", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.DecimeterPerSecond, "DecimetersPerSecond", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.FootPerHour, "FeetPerHour", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Hour), "Speed"), + new UnitInfo(SpeedUnit.FootPerMinute, "FeetPerMinute", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Minute), "Speed"), + new UnitInfo(SpeedUnit.FootPerSecond, "FeetPerSecond", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Second), "Speed"), + new UnitInfo(SpeedUnit.InchPerHour, "InchesPerHour", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Hour), "Speed"), + new UnitInfo(SpeedUnit.InchPerMinute, "InchesPerMinute", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Minute), "Speed"), + new UnitInfo(SpeedUnit.InchPerSecond, "InchesPerSecond", new BaseUnits(length: LengthUnit.Inch, time: DurationUnit.Second), "Speed"), + new UnitInfo(SpeedUnit.KilometerPerHour, "KilometersPerHour", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.KilometerPerMinute, "KilometersPerMinutes", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.KilometerPerSecond, "KilometersPerSecond", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.Knot, "Knots", new BaseUnits(length: LengthUnit.NauticalMile, time: DurationUnit.Hour), "Speed"), + new UnitInfo(SpeedUnit.Mach, "Mach", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.MeterPerHour, "MetersPerHour", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Hour), "Speed"), + new UnitInfo(SpeedUnit.MeterPerMinute, "MetersPerMinutes", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Minute), "Speed"), + new UnitInfo(SpeedUnit.MeterPerSecond, "MetersPerSecond", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second), "Speed"), + new UnitInfo(SpeedUnit.MicrometerPerMinute, "MicrometersPerMinutes", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.MicrometerPerSecond, "MicrometersPerSecond", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.MilePerHour, "MilesPerHour", new BaseUnits(length: LengthUnit.Mile, time: DurationUnit.Hour), "Speed"), + new UnitInfo(SpeedUnit.MillimeterPerHour, "MillimetersPerHour", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.MillimeterPerMinute, "MillimetersPerMinutes", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.MillimeterPerSecond, "MillimetersPerSecond", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.NanometerPerMinute, "NanometersPerMinutes", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.NanometerPerSecond, "NanometersPerSecond", BaseUnits.Undefined, "Speed"), + new UnitInfo(SpeedUnit.UsSurveyFootPerHour, "UsSurveyFeetPerHour", new BaseUnits(length: LengthUnit.UsSurveyFoot, time: DurationUnit.Hour), "Speed"), + new UnitInfo(SpeedUnit.UsSurveyFootPerMinute, "UsSurveyFeetPerMinute", new BaseUnits(length: LengthUnit.UsSurveyFoot, time: DurationUnit.Minute), "Speed"), + new UnitInfo(SpeedUnit.UsSurveyFootPerSecond, "UsSurveyFeetPerSecond", new BaseUnits(length: LengthUnit.UsSurveyFoot, time: DurationUnit.Second), "Speed"), + new UnitInfo(SpeedUnit.YardPerHour, "YardsPerHour", new BaseUnits(length: LengthUnit.Yard, time: DurationUnit.Hour), "Speed"), + new UnitInfo(SpeedUnit.YardPerMinute, "YardsPerMinute", new BaseUnits(length: LengthUnit.Yard, time: DurationUnit.Minute), "Speed"), + new UnitInfo(SpeedUnit.YardPerSecond, "YardsPerSecond", new BaseUnits(length: LengthUnit.Yard, time: DurationUnit.Second), "Speed"), }, BaseUnit, Zero, BaseDimensions); @@ -448,67 +448,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(SpeedUnit.MeterPerSecond, SpeedUnit.YardPerSecond, quantity => quantity.ToUnit(SpeedUnit.YardPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.CentimeterPerHour, new CultureInfo("en-US"), false, true, new string[]{"cm/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.CentimeterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"см/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.CentimeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"cm/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.CentimeterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"см/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.CentimeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"cm/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.CentimeterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"см/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.DecimeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"dm/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.DecimeterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"дм/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.DecimeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"dm/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.DecimeterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"дм/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.FootPerHour, new CultureInfo("en-US"), false, true, new string[]{"ft/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.FootPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"фут/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.FootPerMinute, new CultureInfo("en-US"), false, true, new string[]{"ft/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.FootPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"фут/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.FootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"ft/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.FootPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"фут/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.InchPerHour, new CultureInfo("en-US"), false, true, new string[]{"in/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.InchPerMinute, new CultureInfo("en-US"), false, true, new string[]{"in/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.InchPerSecond, new CultureInfo("en-US"), false, true, new string[]{"in/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.KilometerPerHour, new CultureInfo("en-US"), false, true, new string[]{"km/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.KilometerPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"км/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.KilometerPerMinute, new CultureInfo("en-US"), false, true, new string[]{"km/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.KilometerPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"км/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.KilometerPerSecond, new CultureInfo("en-US"), false, true, new string[]{"km/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.KilometerPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"км/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.Knot, new CultureInfo("en-US"), false, true, new string[]{"kn", "kt", "knot", "knots"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.Knot, new CultureInfo("ru-RU"), false, true, new string[]{"уз."}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.Mach, new CultureInfo("en-US"), false, true, new string[]{"M", "Ma", "MN", "MACH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.Mach, new CultureInfo("ru-RU"), false, true, new string[]{"мах"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MeterPerHour, new CultureInfo("en-US"), false, true, new string[]{"m/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MeterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"м/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"m/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MeterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"м/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"m/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MeterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"м/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MicrometerPerMinute, new CultureInfo("en-US"), false, true, new string[]{"µm/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MicrometerPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"мкм/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MicrometerPerSecond, new CultureInfo("en-US"), false, true, new string[]{"µm/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MicrometerPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мкм/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MilePerHour, new CultureInfo("en-US"), false, true, new string[]{"mph"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MilePerHour, new CultureInfo("ru-RU"), false, true, new string[]{"миль/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MillimeterPerHour, new CultureInfo("en-US"), false, true, new string[]{"mm/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MillimeterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"мм/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MillimeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"mm/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MillimeterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"мм/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MillimeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mm/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.MillimeterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мм/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.NanometerPerMinute, new CultureInfo("en-US"), false, true, new string[]{"nm/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.NanometerPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"нм/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.NanometerPerSecond, new CultureInfo("en-US"), false, true, new string[]{"nm/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.NanometerPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"нм/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.UsSurveyFootPerHour, new CultureInfo("en-US"), false, true, new string[]{"ftUS/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.UsSurveyFootPerMinute, new CultureInfo("en-US"), false, true, new string[]{"ftUS/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.UsSurveyFootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"ftUS/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.YardPerHour, new CultureInfo("en-US"), false, true, new string[]{"yd/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.YardPerMinute, new CultureInfo("en-US"), false, true, new string[]{"yd/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(SpeedUnit.YardPerSecond, new CultureInfo("en-US"), false, true, new string[]{"yd/s"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs index 5635b16c1e..388c7575f6 100644 --- a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs @@ -65,15 +65,15 @@ static StandardVolumeFlow() Info = new QuantityInfo("StandardVolumeFlow", new UnitInfo[] { - new UnitInfo(StandardVolumeFlowUnit.StandardCubicCentimeterPerMinute, "StandardCubicCentimetersPerMinute", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardCubicFootPerHour, "StandardCubicFeetPerHour", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardCubicFootPerMinute, "StandardCubicFeetPerMinute", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardCubicFootPerSecond, "StandardCubicFeetPerSecond", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerDay, "StandardCubicMetersPerDay", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerHour, "StandardCubicMetersPerHour", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerMinute, "StandardCubicMetersPerMinute", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerSecond, "StandardCubicMetersPerSecond", BaseUnits.Undefined), - new UnitInfo(StandardVolumeFlowUnit.StandardLiterPerMinute, "StandardLitersPerMinute", BaseUnits.Undefined), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicCentimeterPerMinute, "StandardCubicCentimetersPerMinute", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicFootPerHour, "StandardCubicFeetPerHour", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicFootPerMinute, "StandardCubicFeetPerMinute", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicFootPerSecond, "StandardCubicFeetPerSecond", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerDay, "StandardCubicMetersPerDay", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerHour, "StandardCubicMetersPerHour", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerMinute, "StandardCubicMetersPerMinute", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardCubicMeterPerSecond, "StandardCubicMetersPerSecond", BaseUnits.Undefined, "StandardVolumeFlow"), + new UnitInfo(StandardVolumeFlowUnit.StandardLiterPerMinute, "StandardLitersPerMinute", BaseUnits.Undefined, "StandardVolumeFlow"), }, BaseUnit, Zero, BaseDimensions); @@ -256,19 +256,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(StandardVolumeFlowUnit.StandardCubicMeterPerSecond, StandardVolumeFlowUnit.StandardLiterPerMinute, quantity => quantity.ToUnit(StandardVolumeFlowUnit.StandardLiterPerMinute)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicCentimeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"sccm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicFootPerHour, new CultureInfo("en-US"), false, true, new string[]{"scfh"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicFootPerMinute, new CultureInfo("en-US"), false, true, new string[]{"scfm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicFootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Sft³/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicMeterPerDay, new CultureInfo("en-US"), false, true, new string[]{"Sm³/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicMeterPerHour, new CultureInfo("en-US"), false, true, new string[]{"Sm³/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicMeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"Sm³/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardCubicMeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Sm³/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(StandardVolumeFlowUnit.StandardLiterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"slm"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs index a5e0c7cc10..de8ee820bf 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs @@ -65,16 +65,16 @@ static Temperature() Info = new QuantityInfo("Temperature", new UnitInfo[] { - new UnitInfo(TemperatureUnit.DegreeCelsius, "DegreesCelsius", new BaseUnits(temperature: TemperatureUnit.DegreeCelsius)), - new UnitInfo(TemperatureUnit.DegreeDelisle, "DegreesDelisle", new BaseUnits(temperature: TemperatureUnit.DegreeDelisle)), - new UnitInfo(TemperatureUnit.DegreeFahrenheit, "DegreesFahrenheit", new BaseUnits(temperature: TemperatureUnit.DegreeFahrenheit)), - new UnitInfo(TemperatureUnit.DegreeNewton, "DegreesNewton", new BaseUnits(temperature: TemperatureUnit.DegreeNewton)), - new UnitInfo(TemperatureUnit.DegreeRankine, "DegreesRankine", new BaseUnits(temperature: TemperatureUnit.DegreeRankine)), - new UnitInfo(TemperatureUnit.DegreeReaumur, "DegreesReaumur", new BaseUnits(temperature: TemperatureUnit.DegreeReaumur)), - new UnitInfo(TemperatureUnit.DegreeRoemer, "DegreesRoemer", new BaseUnits(temperature: TemperatureUnit.DegreeRoemer)), - new UnitInfo(TemperatureUnit.Kelvin, "Kelvins", new BaseUnits(temperature: TemperatureUnit.Kelvin)), - new UnitInfo(TemperatureUnit.MillidegreeCelsius, "MillidegreesCelsius", new BaseUnits(temperature: TemperatureUnit.DegreeCelsius)), - new UnitInfo(TemperatureUnit.SolarTemperature, "SolarTemperatures", BaseUnits.Undefined), + new UnitInfo(TemperatureUnit.DegreeCelsius, "DegreesCelsius", new BaseUnits(temperature: TemperatureUnit.DegreeCelsius), "Temperature"), + new UnitInfo(TemperatureUnit.DegreeDelisle, "DegreesDelisle", new BaseUnits(temperature: TemperatureUnit.DegreeDelisle), "Temperature"), + new UnitInfo(TemperatureUnit.DegreeFahrenheit, "DegreesFahrenheit", new BaseUnits(temperature: TemperatureUnit.DegreeFahrenheit), "Temperature"), + new UnitInfo(TemperatureUnit.DegreeNewton, "DegreesNewton", new BaseUnits(temperature: TemperatureUnit.DegreeNewton), "Temperature"), + new UnitInfo(TemperatureUnit.DegreeRankine, "DegreesRankine", new BaseUnits(temperature: TemperatureUnit.DegreeRankine), "Temperature"), + new UnitInfo(TemperatureUnit.DegreeReaumur, "DegreesReaumur", new BaseUnits(temperature: TemperatureUnit.DegreeReaumur), "Temperature"), + new UnitInfo(TemperatureUnit.DegreeRoemer, "DegreesRoemer", new BaseUnits(temperature: TemperatureUnit.DegreeRoemer), "Temperature"), + new UnitInfo(TemperatureUnit.Kelvin, "Kelvins", new BaseUnits(temperature: TemperatureUnit.Kelvin), "Temperature"), + new UnitInfo(TemperatureUnit.MillidegreeCelsius, "MillidegreesCelsius", new BaseUnits(temperature: TemperatureUnit.DegreeCelsius), "Temperature"), + new UnitInfo(TemperatureUnit.SolarTemperature, "SolarTemperatures", BaseUnits.Undefined, "Temperature"), }, BaseUnit, Zero, BaseDimensions); @@ -261,20 +261,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(TemperatureUnit.Kelvin, TemperatureUnit.SolarTemperature, quantity => quantity.ToUnit(TemperatureUnit.SolarTemperature)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.DegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.DegreeDelisle, new CultureInfo("en-US"), false, true, new string[]{"°De"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.DegreeFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.DegreeNewton, new CultureInfo("en-US"), false, true, new string[]{"°N"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.DegreeRankine, new CultureInfo("en-US"), false, true, new string[]{"°R"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.DegreeReaumur, new CultureInfo("en-US"), false, true, new string[]{"°Ré"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.DegreeRoemer, new CultureInfo("en-US"), false, true, new string[]{"°Rø"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.Kelvin, new CultureInfo("en-US"), false, true, new string[]{"K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.MillidegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"m°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureUnit.SolarTemperature, new CultureInfo("en-US"), false, true, new string[]{"T⊙"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs index fc77391e9f..9b916fba98 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs @@ -65,16 +65,16 @@ static TemperatureChangeRate() Info = new QuantityInfo("TemperatureChangeRate", new UnitInfo[] { - new UnitInfo(TemperatureChangeRateUnit.CentidegreeCelsiusPerSecond, "CentidegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.DecadegreeCelsiusPerSecond, "DecadegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.DecidegreeCelsiusPerSecond, "DecidegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.DegreeCelsiusPerMinute, "DegreesCelsiusPerMinute", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.DegreeCelsiusPerSecond, "DegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.HectodegreeCelsiusPerSecond, "HectodegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.KilodegreeCelsiusPerSecond, "KilodegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.MicrodegreeCelsiusPerSecond, "MicrodegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.MillidegreeCelsiusPerSecond, "MillidegreesCelsiusPerSecond", BaseUnits.Undefined), - new UnitInfo(TemperatureChangeRateUnit.NanodegreeCelsiusPerSecond, "NanodegreesCelsiusPerSecond", BaseUnits.Undefined), + new UnitInfo(TemperatureChangeRateUnit.CentidegreeCelsiusPerSecond, "CentidegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.DecadegreeCelsiusPerSecond, "DecadegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.DecidegreeCelsiusPerSecond, "DecidegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.DegreeCelsiusPerMinute, "DegreesCelsiusPerMinute", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.DegreeCelsiusPerSecond, "DegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.HectodegreeCelsiusPerSecond, "HectodegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.KilodegreeCelsiusPerSecond, "KilodegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.MicrodegreeCelsiusPerSecond, "MicrodegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.MillidegreeCelsiusPerSecond, "MillidegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), + new UnitInfo(TemperatureChangeRateUnit.NanodegreeCelsiusPerSecond, "NanodegreesCelsiusPerSecond", BaseUnits.Undefined, "TemperatureChangeRate"), }, BaseUnit, Zero, BaseDimensions); @@ -264,20 +264,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(TemperatureChangeRateUnit.DegreeCelsiusPerSecond, TemperatureChangeRateUnit.NanodegreeCelsiusPerSecond, quantity => quantity.ToUnit(TemperatureChangeRateUnit.NanodegreeCelsiusPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.CentidegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"c°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.DecadegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"da°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.DecidegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"d°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.DegreeCelsiusPerMinute, new CultureInfo("en-US"), false, true, new string[]{"°C/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.DegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.HectodegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"h°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.KilodegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"k°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.MicrodegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"µ°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.MillidegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"m°C/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureChangeRateUnit.NanodegreeCelsiusPerSecond, new CultureInfo("en-US"), false, true, new string[]{"n°C/s"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs index c360176612..943bc27870 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs @@ -65,15 +65,15 @@ static TemperatureDelta() Info = new QuantityInfo("TemperatureDelta", new UnitInfo[] { - new UnitInfo(TemperatureDeltaUnit.DegreeCelsius, "DegreesCelsius", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.DegreeDelisle, "DegreesDelisle", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.DegreeFahrenheit, "DegreesFahrenheit", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.DegreeNewton, "DegreesNewton", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.DegreeRankine, "DegreesRankine", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.DegreeReaumur, "DegreesReaumur", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.DegreeRoemer, "DegreesRoemer", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.Kelvin, "Kelvins", BaseUnits.Undefined), - new UnitInfo(TemperatureDeltaUnit.MillidegreeCelsius, "MillidegreesCelsius", BaseUnits.Undefined), + new UnitInfo(TemperatureDeltaUnit.DegreeCelsius, "DegreesCelsius", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.DegreeDelisle, "DegreesDelisle", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.DegreeFahrenheit, "DegreesFahrenheit", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.DegreeNewton, "DegreesNewton", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.DegreeRankine, "DegreesRankine", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.DegreeReaumur, "DegreesReaumur", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.DegreeRoemer, "DegreesRoemer", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.Kelvin, "Kelvins", BaseUnits.Undefined, "TemperatureDelta"), + new UnitInfo(TemperatureDeltaUnit.MillidegreeCelsius, "MillidegreesCelsius", BaseUnits.Undefined, "TemperatureDelta"), }, BaseUnit, Zero, BaseDimensions); @@ -256,19 +256,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(TemperatureDeltaUnit.Kelvin, TemperatureDeltaUnit.MillidegreeCelsius, quantity => quantity.ToUnit(TemperatureDeltaUnit.MillidegreeCelsius)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.DegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"∆°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.DegreeDelisle, new CultureInfo("en-US"), false, true, new string[]{"∆°De"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.DegreeFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"∆°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.DegreeNewton, new CultureInfo("en-US"), false, true, new string[]{"∆°N"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.DegreeRankine, new CultureInfo("en-US"), false, true, new string[]{"∆°R"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.DegreeReaumur, new CultureInfo("en-US"), false, true, new string[]{"∆°Ré"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.DegreeRoemer, new CultureInfo("en-US"), false, true, new string[]{"∆°Rø"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.Kelvin, new CultureInfo("en-US"), false, true, new string[]{"∆K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureDeltaUnit.MillidegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"∆m°C"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs index b5dcf10547..b602b7ef7d 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs @@ -65,10 +65,10 @@ static TemperatureGradient() Info = new QuantityInfo("TemperatureGradient", new UnitInfo[] { - new UnitInfo(TemperatureGradientUnit.DegreeCelsiusPerKilometer, "DegreesCelciusPerKilometer", new BaseUnits(length: LengthUnit.Kilometer, temperature: TemperatureUnit.DegreeCelsius)), - new UnitInfo(TemperatureGradientUnit.DegreeCelsiusPerMeter, "DegreesCelciusPerMeter", new BaseUnits(length: LengthUnit.Meter, temperature: TemperatureUnit.DegreeCelsius)), - new UnitInfo(TemperatureGradientUnit.DegreeFahrenheitPerFoot, "DegreesFahrenheitPerFoot", new BaseUnits(length: LengthUnit.Foot, temperature: TemperatureUnit.DegreeFahrenheit)), - new UnitInfo(TemperatureGradientUnit.KelvinPerMeter, "KelvinsPerMeter", new BaseUnits(length: LengthUnit.Meter, temperature: TemperatureUnit.Kelvin)), + new UnitInfo(TemperatureGradientUnit.DegreeCelsiusPerKilometer, "DegreesCelciusPerKilometer", new BaseUnits(length: LengthUnit.Kilometer, temperature: TemperatureUnit.DegreeCelsius), "TemperatureGradient"), + new UnitInfo(TemperatureGradientUnit.DegreeCelsiusPerMeter, "DegreesCelciusPerMeter", new BaseUnits(length: LengthUnit.Meter, temperature: TemperatureUnit.DegreeCelsius), "TemperatureGradient"), + new UnitInfo(TemperatureGradientUnit.DegreeFahrenheitPerFoot, "DegreesFahrenheitPerFoot", new BaseUnits(length: LengthUnit.Foot, temperature: TemperatureUnit.DegreeFahrenheit), "TemperatureGradient"), + new UnitInfo(TemperatureGradientUnit.KelvinPerMeter, "KelvinsPerMeter", new BaseUnits(length: LengthUnit.Meter, temperature: TemperatureUnit.Kelvin), "TemperatureGradient"), }, BaseUnit, Zero, BaseDimensions); @@ -216,14 +216,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(TemperatureGradientUnit.KelvinPerMeter, TemperatureGradientUnit.DegreeFahrenheitPerFoot, quantity => quantity.ToUnit(TemperatureGradientUnit.DegreeFahrenheitPerFoot)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureGradientUnit.DegreeCelsiusPerKilometer, new CultureInfo("en-US"), false, true, new string[]{"∆°C/km"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureGradientUnit.DegreeCelsiusPerMeter, new CultureInfo("en-US"), false, true, new string[]{"∆°C/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureGradientUnit.DegreeFahrenheitPerFoot, new CultureInfo("en-US"), false, true, new string[]{"∆°F/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TemperatureGradientUnit.KelvinPerMeter, new CultureInfo("en-US"), false, true, new string[]{"∆°K/m"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs index 3d579a5d62..2b98b5ddea 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs @@ -68,8 +68,8 @@ static ThermalConductivity() Info = new QuantityInfo("ThermalConductivity", new UnitInfo[] { - new UnitInfo(ThermalConductivityUnit.BtuPerHourFootFahrenheit, "BtusPerHourFootFahrenheit", BaseUnits.Undefined), - new UnitInfo(ThermalConductivityUnit.WattPerMeterKelvin, "WattsPerMeterKelvin", BaseUnits.Undefined), + new UnitInfo(ThermalConductivityUnit.BtuPerHourFootFahrenheit, "BtusPerHourFootFahrenheit", BaseUnits.Undefined, "ThermalConductivity"), + new UnitInfo(ThermalConductivityUnit.WattPerMeterKelvin, "WattsPerMeterKelvin", BaseUnits.Undefined, "ThermalConductivity"), }, BaseUnit, Zero, BaseDimensions); @@ -203,12 +203,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ThermalConductivityUnit.WattPerMeterKelvin, ThermalConductivityUnit.BtuPerHourFootFahrenheit, quantity => quantity.ToUnit(ThermalConductivityUnit.BtuPerHourFootFahrenheit)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalConductivityUnit.BtuPerHourFootFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"BTU/h·ft·°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalConductivityUnit.WattPerMeterKelvin, new CultureInfo("en-US"), false, true, new string[]{"W/m·K"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs index 78e8ff9110..cb268e3c27 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs @@ -65,12 +65,12 @@ static ThermalResistance() Info = new QuantityInfo("ThermalResistance", new UnitInfo[] { - new UnitInfo(ThermalResistanceUnit.HourSquareFeetDegreeFahrenheitPerBtu, "HourSquareFeetDegreesFahrenheitPerBtu", BaseUnits.Undefined), - new UnitInfo(ThermalResistanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie, "SquareCentimeterHourDegreesCelsiusPerKilocalorie", BaseUnits.Undefined), - new UnitInfo(ThermalResistanceUnit.SquareCentimeterKelvinPerWatt, "SquareCentimeterKelvinsPerWatt", BaseUnits.Undefined), - new UnitInfo(ThermalResistanceUnit.SquareMeterDegreeCelsiusPerWatt, "SquareMeterDegreesCelsiusPerWatt", BaseUnits.Undefined), - new UnitInfo(ThermalResistanceUnit.SquareMeterKelvinPerKilowatt, "SquareMeterKelvinsPerKilowatt", BaseUnits.Undefined), - new UnitInfo(ThermalResistanceUnit.SquareMeterKelvinPerWatt, "SquareMeterKelvinsPerWatt", BaseUnits.Undefined), + new UnitInfo(ThermalResistanceUnit.HourSquareFeetDegreeFahrenheitPerBtu, "HourSquareFeetDegreesFahrenheitPerBtu", BaseUnits.Undefined, "ThermalResistance"), + new UnitInfo(ThermalResistanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie, "SquareCentimeterHourDegreesCelsiusPerKilocalorie", BaseUnits.Undefined, "ThermalResistance"), + new UnitInfo(ThermalResistanceUnit.SquareCentimeterKelvinPerWatt, "SquareCentimeterKelvinsPerWatt", BaseUnits.Undefined, "ThermalResistance"), + new UnitInfo(ThermalResistanceUnit.SquareMeterDegreeCelsiusPerWatt, "SquareMeterDegreesCelsiusPerWatt", BaseUnits.Undefined, "ThermalResistance"), + new UnitInfo(ThermalResistanceUnit.SquareMeterKelvinPerKilowatt, "SquareMeterKelvinsPerKilowatt", BaseUnits.Undefined, "ThermalResistance"), + new UnitInfo(ThermalResistanceUnit.SquareMeterKelvinPerWatt, "SquareMeterKelvinsPerWatt", BaseUnits.Undefined, "ThermalResistance"), }, BaseUnit, Zero, BaseDimensions); @@ -232,16 +232,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(ThermalResistanceUnit.SquareMeterKelvinPerKilowatt, ThermalResistanceUnit.SquareMeterKelvinPerWatt, quantity => quantity.ToUnit(ThermalResistanceUnit.SquareMeterKelvinPerWatt)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalResistanceUnit.HourSquareFeetDegreeFahrenheitPerBtu, new CultureInfo("en-US"), false, true, new string[]{"Hrft²°F/Btu"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalResistanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie, new CultureInfo("en-US"), false, true, new string[]{"cm²Hr°C/kcal"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalResistanceUnit.SquareCentimeterKelvinPerWatt, new CultureInfo("en-US"), false, true, new string[]{"cm²K/W"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalResistanceUnit.SquareMeterDegreeCelsiusPerWatt, new CultureInfo("en-US"), false, true, new string[]{"m²°C/W"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalResistanceUnit.SquareMeterKelvinPerKilowatt, new CultureInfo("en-US"), false, true, new string[]{"m²K/kW"}); - unitAbbreviationsCache.PerformAbbreviationMapping(ThermalResistanceUnit.SquareMeterKelvinPerWatt, new CultureInfo("en-US"), false, true, new string[]{"m²K/W"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs index 850017d7dc..b3e0aff496 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs @@ -65,31 +65,31 @@ static Torque() Info = new QuantityInfo("Torque", new UnitInfo[] { - new UnitInfo(TorqueUnit.GramForceCentimeter, "GramForceCentimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.GramForceMeter, "GramForceMeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.GramForceMillimeter, "GramForceMillimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilogramForceCentimeter, "KilogramForceCentimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilogramForceMeter, "KilogramForceMeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilogramForceMillimeter, "KilogramForceMillimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilonewtonCentimeter, "KilonewtonCentimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilonewtonMeter, "KilonewtonMeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilonewtonMillimeter, "KilonewtonMillimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilopoundForceFoot, "KilopoundForceFeet", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.KilopoundForceInch, "KilopoundForceInches", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.MeganewtonCentimeter, "MeganewtonCentimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.MeganewtonMeter, "MeganewtonMeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.MeganewtonMillimeter, "MeganewtonMillimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.MegapoundForceFoot, "MegapoundForceFeet", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.MegapoundForceInch, "MegapoundForceInches", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.NewtonCentimeter, "NewtonCentimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.NewtonMeter, "NewtonMeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.NewtonMillimeter, "NewtonMillimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.PoundalFoot, "PoundalFeet", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.PoundForceFoot, "PoundForceFeet", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.PoundForceInch, "PoundForceInches", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.TonneForceCentimeter, "TonneForceCentimeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.TonneForceMeter, "TonneForceMeters", BaseUnits.Undefined), - new UnitInfo(TorqueUnit.TonneForceMillimeter, "TonneForceMillimeters", BaseUnits.Undefined), + new UnitInfo(TorqueUnit.GramForceCentimeter, "GramForceCentimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.GramForceMeter, "GramForceMeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.GramForceMillimeter, "GramForceMillimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilogramForceCentimeter, "KilogramForceCentimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilogramForceMeter, "KilogramForceMeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilogramForceMillimeter, "KilogramForceMillimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilonewtonCentimeter, "KilonewtonCentimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilonewtonMeter, "KilonewtonMeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilonewtonMillimeter, "KilonewtonMillimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilopoundForceFoot, "KilopoundForceFeet", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.KilopoundForceInch, "KilopoundForceInches", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.MeganewtonCentimeter, "MeganewtonCentimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.MeganewtonMeter, "MeganewtonMeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.MeganewtonMillimeter, "MeganewtonMillimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.MegapoundForceFoot, "MegapoundForceFeet", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.MegapoundForceInch, "MegapoundForceInches", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.NewtonCentimeter, "NewtonCentimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.NewtonMeter, "NewtonMeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.NewtonMillimeter, "NewtonMillimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.PoundalFoot, "PoundalFeet", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.PoundForceFoot, "PoundForceFeet", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.PoundForceInch, "PoundForceInches", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.TonneForceCentimeter, "TonneForceCentimeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.TonneForceMeter, "TonneForceMeters", BaseUnits.Undefined, "Torque"), + new UnitInfo(TorqueUnit.TonneForceMillimeter, "TonneForceMillimeters", BaseUnits.Undefined, "Torque"), }, BaseUnit, Zero, BaseDimensions); @@ -384,38 +384,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(TorqueUnit.NewtonMeter, TorqueUnit.TonneForceMillimeter, quantity => quantity.ToUnit(TorqueUnit.TonneForceMillimeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.GramForceCentimeter, new CultureInfo("en-US"), false, true, new string[]{"gf·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.GramForceMeter, new CultureInfo("en-US"), false, true, new string[]{"gf·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.GramForceMillimeter, new CultureInfo("en-US"), false, true, new string[]{"gf·mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilogramForceCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilogramForceMeter, new CultureInfo("en-US"), false, true, new string[]{"kgf·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilogramForceMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kgf·mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilonewtonCentimeter, new CultureInfo("en-US"), false, true, new string[]{"kN·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilonewtonMeter, new CultureInfo("en-US"), false, true, new string[]{"kN·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilonewtonMeter, new CultureInfo("ru-RU"), false, true, new string[]{"кН·м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilonewtonMillimeter, new CultureInfo("en-US"), false, true, new string[]{"kN·mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilopoundForceFoot, new CultureInfo("en-US"), false, true, new string[]{"kipf·ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.KilopoundForceInch, new CultureInfo("en-US"), false, true, new string[]{"kipf·in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.MeganewtonCentimeter, new CultureInfo("en-US"), false, true, new string[]{"MN·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.MeganewtonMeter, new CultureInfo("en-US"), false, true, new string[]{"MN·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.MeganewtonMeter, new CultureInfo("ru-RU"), false, true, new string[]{"МН·м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.MeganewtonMillimeter, new CultureInfo("en-US"), false, true, new string[]{"MN·mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.MegapoundForceFoot, new CultureInfo("en-US"), false, true, new string[]{"Mlbf·ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.MegapoundForceInch, new CultureInfo("en-US"), false, true, new string[]{"Mlbf·in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.NewtonCentimeter, new CultureInfo("en-US"), false, true, new string[]{"N·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.NewtonMeter, new CultureInfo("en-US"), false, true, new string[]{"N·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.NewtonMeter, new CultureInfo("ru-RU"), false, true, new string[]{"Н·м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.NewtonMillimeter, new CultureInfo("en-US"), false, true, new string[]{"N·mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.PoundalFoot, new CultureInfo("en-US"), false, true, new string[]{"pdl·ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.PoundForceFoot, new CultureInfo("en-US"), false, true, new string[]{"lbf·ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.PoundForceInch, new CultureInfo("en-US"), false, true, new string[]{"lbf·in"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.TonneForceCentimeter, new CultureInfo("en-US"), false, true, new string[]{"tf·cm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.TonneForceMeter, new CultureInfo("en-US"), false, true, new string[]{"tf·m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorqueUnit.TonneForceMillimeter, new CultureInfo("en-US"), false, true, new string[]{"tf·mm"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs index c7ceaf0637..cdaa67aafe 100644 --- a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs @@ -65,27 +65,27 @@ static TorquePerLength() Info = new QuantityInfo("TorquePerLength", new UnitInfo[] { - new UnitInfo(TorquePerLengthUnit.KilogramForceCentimeterPerMeter, "KilogramForceCentimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.KilogramForceMeterPerMeter, "KilogramForceMetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.KilogramForceMillimeterPerMeter, "KilogramForceMillimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.KilonewtonCentimeterPerMeter, "KilonewtonCentimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.KilonewtonMeterPerMeter, "KilonewtonMetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.KilonewtonMillimeterPerMeter, "KilonewtonMillimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.KilopoundForceFootPerFoot, "KilopoundForceFeetPerFoot", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.KilopoundForceInchPerFoot, "KilopoundForceInchesPerFoot", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.MeganewtonCentimeterPerMeter, "MeganewtonCentimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.MeganewtonMeterPerMeter, "MeganewtonMetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.MeganewtonMillimeterPerMeter, "MeganewtonMillimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.MegapoundForceFootPerFoot, "MegapoundForceFeetPerFoot", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.MegapoundForceInchPerFoot, "MegapoundForceInchesPerFoot", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.NewtonCentimeterPerMeter, "NewtonCentimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.NewtonMeterPerMeter, "NewtonMetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.NewtonMillimeterPerMeter, "NewtonMillimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.PoundForceFootPerFoot, "PoundForceFeetPerFoot", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.PoundForceInchPerFoot, "PoundForceInchesPerFoot", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.TonneForceCentimeterPerMeter, "TonneForceCentimetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.TonneForceMeterPerMeter, "TonneForceMetersPerMeter", BaseUnits.Undefined), - new UnitInfo(TorquePerLengthUnit.TonneForceMillimeterPerMeter, "TonneForceMillimetersPerMeter", BaseUnits.Undefined), + new UnitInfo(TorquePerLengthUnit.KilogramForceCentimeterPerMeter, "KilogramForceCentimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.KilogramForceMeterPerMeter, "KilogramForceMetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.KilogramForceMillimeterPerMeter, "KilogramForceMillimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.KilonewtonCentimeterPerMeter, "KilonewtonCentimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.KilonewtonMeterPerMeter, "KilonewtonMetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.KilonewtonMillimeterPerMeter, "KilonewtonMillimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.KilopoundForceFootPerFoot, "KilopoundForceFeetPerFoot", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.KilopoundForceInchPerFoot, "KilopoundForceInchesPerFoot", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.MeganewtonCentimeterPerMeter, "MeganewtonCentimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.MeganewtonMeterPerMeter, "MeganewtonMetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.MeganewtonMillimeterPerMeter, "MeganewtonMillimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.MegapoundForceFootPerFoot, "MegapoundForceFeetPerFoot", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.MegapoundForceInchPerFoot, "MegapoundForceInchesPerFoot", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.NewtonCentimeterPerMeter, "NewtonCentimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.NewtonMeterPerMeter, "NewtonMetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.NewtonMillimeterPerMeter, "NewtonMillimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.PoundForceFootPerFoot, "PoundForceFeetPerFoot", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.PoundForceInchPerFoot, "PoundForceInchesPerFoot", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.TonneForceCentimeterPerMeter, "TonneForceCentimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.TonneForceMeterPerMeter, "TonneForceMetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), + new UnitInfo(TorquePerLengthUnit.TonneForceMillimeterPerMeter, "TonneForceMillimetersPerMeter", BaseUnits.Undefined, "TorquePerLength"), }, BaseUnit, Zero, BaseDimensions); @@ -352,34 +352,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(TorquePerLengthUnit.NewtonMeterPerMeter, TorquePerLengthUnit.TonneForceMillimeterPerMeter, quantity => quantity.ToUnit(TorquePerLengthUnit.TonneForceMillimeterPerMeter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilogramForceCentimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kgf·cm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilogramForceMeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kgf·m/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilogramForceMillimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kgf·mm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilonewtonCentimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kN·cm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilonewtonMeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kN·m/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilonewtonMeterPerMeter, new CultureInfo("ru-RU"), false, true, new string[]{"кН·м/м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilonewtonMillimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"kN·mm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilopoundForceFootPerFoot, new CultureInfo("en-US"), false, true, new string[]{"kipf·ft/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.KilopoundForceInchPerFoot, new CultureInfo("en-US"), false, true, new string[]{"kipf·in/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.MeganewtonCentimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"MN·cm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.MeganewtonMeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"MN·m/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.MeganewtonMeterPerMeter, new CultureInfo("ru-RU"), false, true, new string[]{"МН·м/м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.MeganewtonMillimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"MN·mm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.MegapoundForceFootPerFoot, new CultureInfo("en-US"), false, true, new string[]{"Mlbf·ft/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.MegapoundForceInchPerFoot, new CultureInfo("en-US"), false, true, new string[]{"Mlbf·in/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.NewtonCentimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"N·cm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.NewtonMeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"N·m/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.NewtonMeterPerMeter, new CultureInfo("ru-RU"), false, true, new string[]{"Н·м/м"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.NewtonMillimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"N·mm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.PoundForceFootPerFoot, new CultureInfo("en-US"), false, true, new string[]{"lbf·ft/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.PoundForceInchPerFoot, new CultureInfo("en-US"), false, true, new string[]{"lbf·in/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.TonneForceCentimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"tf·cm/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.TonneForceMeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"tf·m/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(TorquePerLengthUnit.TonneForceMillimeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"tf·mm/m"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs index 0c0551f1e1..9066c2dceb 100644 --- a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs @@ -68,7 +68,7 @@ static Turbidity() Info = new QuantityInfo("Turbidity", new UnitInfo[] { - new UnitInfo(TurbidityUnit.NTU, "NTU", BaseUnits.Undefined), + new UnitInfo(TurbidityUnit.NTU, "NTU", BaseUnits.Undefined, "Turbidity"), }, BaseUnit, Zero, BaseDimensions); @@ -195,11 +195,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> TurbidityUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(TurbidityUnit.NTU, new CultureInfo("en-US"), false, true, new string[]{"NTU"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs index baf20d4890..00a6722f46 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs @@ -65,7 +65,7 @@ static VitaminA() Info = new QuantityInfo("VitaminA", new UnitInfo[] { - new UnitInfo(VitaminAUnit.InternationalUnit, "InternationalUnits", BaseUnits.Undefined), + new UnitInfo(VitaminAUnit.InternationalUnit, "InternationalUnits", BaseUnits.Undefined, "VitaminA"), }, BaseUnit, Zero, BaseDimensions); @@ -192,11 +192,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) // Register in unit converter: BaseUnit -> VitaminAUnit } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(VitaminAUnit.InternationalUnit, new CultureInfo("en-US"), false, true, new string[]{"IU"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs index c752bec0a1..6f347459ed 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs @@ -65,60 +65,59 @@ static Volume() Info = new QuantityInfo("Volume", new UnitInfo[] { - new UnitInfo(VolumeUnit.AcreFoot, "AcreFeet", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.AuTablespoon, "AuTablespoons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.BoardFoot, "BoardFeet", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Centiliter, "Centiliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicCentimeter, "CubicCentimeters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicDecimeter, "CubicDecimeters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicFoot, "CubicFeet", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicHectometer, "CubicHectometers", new BaseUnits(length: LengthUnit.Hectometer)), - new UnitInfo(VolumeUnit.CubicInch, "CubicInches", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicKilometer, "CubicKilometers", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicMeter, "CubicMeters", new BaseUnits(length: LengthUnit.Meter)), - new UnitInfo(VolumeUnit.CubicMicrometer, "CubicMicrometers", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicMile, "CubicMiles", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicMillimeter, "CubicMillimeters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.CubicYard, "CubicYards", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Decaliter, "Decaliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.DecausGallon, "DecausGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Deciliter, "Deciliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.DeciusGallon, "DeciusGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.HectocubicFoot, "HectocubicFeet", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.HectocubicMeter, "HectocubicMeters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Hectoliter, "Hectoliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.HectousGallon, "HectousGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.ImperialBeerBarrel, "ImperialBeerBarrels", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.ImperialGallon, "ImperialGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.ImperialOunce, "ImperialOunces", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.ImperialPint, "ImperialPints", new BaseUnits(length: LengthUnit.Decimeter)), - new UnitInfo(VolumeUnit.ImperialQuart, "ImperialQuarts", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.KilocubicFoot, "KilocubicFeet", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.KilocubicMeter, "KilocubicMeters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.KiloimperialGallon, "KiloimperialGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Kiloliter, "Kiloliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.KilousGallon, "KilousGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Liter, "Liters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.MegacubicFoot, "MegacubicFeet", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.MegaimperialGallon, "MegaimperialGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Megaliter, "Megaliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.MegausGallon, "MegausGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.MetricCup, "MetricCups", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.MetricTeaspoon, "MetricTeaspoons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Microliter, "Microliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Milliliter, "Milliliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.Nanoliter, "Nanoliters", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.OilBarrel, "OilBarrels", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UkTablespoon, "UkTablespoons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsBeerBarrel, "UsBeerBarrels", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsCustomaryCup, "UsCustomaryCups", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsGallon, "UsGallons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsLegalCup, "UsLegalCups", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsOunce, "UsOunces", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsPint, "UsPints", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsQuart, "UsQuarts", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsTablespoon, "UsTablespoons", BaseUnits.Undefined), - new UnitInfo(VolumeUnit.UsTeaspoon, "UsTeaspoons", BaseUnits.Undefined), + new UnitInfo(VolumeUnit.AcreFoot, "AcreFeet", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.AuTablespoon, "AuTablespoons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.BoardFoot, "BoardFeet", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Centiliter, "Centiliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicCentimeter, "CubicCentimeters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicDecimeter, "CubicDecimeters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicFoot, "CubicFeet", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicHectometer, "CubicHectometers", new BaseUnits(length: LengthUnit.Hectometer), "Volume"), + new UnitInfo(VolumeUnit.CubicInch, "CubicInches", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicKilometer, "CubicKilometers", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicMeter, "CubicMeters", new BaseUnits(length: LengthUnit.Meter), "Volume"), + new UnitInfo(VolumeUnit.CubicMicrometer, "CubicMicrometers", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicMile, "CubicMiles", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicMillimeter, "CubicMillimeters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.CubicYard, "CubicYards", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Decaliter, "Decaliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.DecausGallon, "DecausGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Deciliter, "Deciliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.DeciusGallon, "DeciusGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.HectocubicFoot, "HectocubicFeet", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.HectocubicMeter, "HectocubicMeters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Hectoliter, "Hectoliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.HectousGallon, "HectousGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.ImperialBeerBarrel, "ImperialBeerBarrels", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.ImperialGallon, "ImperialGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.ImperialOunce, "ImperialOunces", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.ImperialPint, "ImperialPints", new BaseUnits(length: LengthUnit.Decimeter), "Volume"), + new UnitInfo(VolumeUnit.KilocubicFoot, "KilocubicFeet", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.KilocubicMeter, "KilocubicMeters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.KiloimperialGallon, "KiloimperialGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Kiloliter, "Kiloliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.KilousGallon, "KilousGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Liter, "Liters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.MegacubicFoot, "MegacubicFeet", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.MegaimperialGallon, "MegaimperialGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Megaliter, "Megaliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.MegausGallon, "MegausGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.MetricCup, "MetricCups", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.MetricTeaspoon, "MetricTeaspoons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Microliter, "Microliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Milliliter, "Milliliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.Nanoliter, "Nanoliters", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.OilBarrel, "OilBarrels", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UkTablespoon, "UkTablespoons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsBeerBarrel, "UsBeerBarrels", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsCustomaryCup, "UsCustomaryCups", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsGallon, "UsGallons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsLegalCup, "UsLegalCups", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsOunce, "UsOunces", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsPint, "UsPints", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsQuart, "UsQuarts", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsTablespoon, "UsTablespoons", BaseUnits.Undefined, "Volume"), + new UnitInfo(VolumeUnit.UsTeaspoon, "UsTeaspoons", BaseUnits.Undefined, "Volume"), }, BaseUnit, Zero, BaseDimensions); @@ -616,112 +615,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(VolumeUnit.CubicMeter, VolumeUnit.UsTeaspoon, quantity => quantity.ToUnit(VolumeUnit.UsTeaspoon)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.AcreFoot, new CultureInfo("en-US"), false, true, new string[]{"ac-ft", "acre-foot", "acre-feet"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.AuTablespoon, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.AuTablespoon, new CultureInfo("ru-RU"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.AuTablespoon, new CultureInfo("nb-NO"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.BoardFoot, new CultureInfo("en-US"), false, true, new string[]{"bf", "board foot", "board feet"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.BoardFoot, new CultureInfo("fr-CA"), false, true, new string[]{"pmp", "pied-planche", "pied de planche"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Centiliter, new CultureInfo("en-US"), false, true, new string[]{"cl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Centiliter, new CultureInfo("ru-RU"), false, true, new string[]{"сл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicCentimeter, new CultureInfo("en-US"), false, true, new string[]{"cm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicCentimeter, new CultureInfo("ru-RU"), false, true, new string[]{"см³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicDecimeter, new CultureInfo("en-US"), false, true, new string[]{"dm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicDecimeter, new CultureInfo("ru-RU"), false, true, new string[]{"дм³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicFoot, new CultureInfo("en-US"), false, true, new string[]{"ft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicFoot, new CultureInfo("ru-RU"), false, true, new string[]{"фут³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicHectometer, new CultureInfo("en-US"), false, true, new string[]{"hm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicHectometer, new CultureInfo("ru-RU"), false, true, new string[]{"гм³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicInch, new CultureInfo("en-US"), false, true, new string[]{"in³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicInch, new CultureInfo("ru-RU"), false, true, new string[]{"дюйм³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicKilometer, new CultureInfo("en-US"), false, true, new string[]{"km³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicKilometer, new CultureInfo("ru-RU"), false, true, new string[]{"км³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMeter, new CultureInfo("en-US"), false, true, new string[]{"m³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"м³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMicrometer, new CultureInfo("en-US"), false, true, new string[]{"µm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMicrometer, new CultureInfo("ru-RU"), false, true, new string[]{"мкм³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMile, new CultureInfo("en-US"), false, true, new string[]{"mi³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMile, new CultureInfo("ru-RU"), false, true, new string[]{"миля³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMillimeter, new CultureInfo("en-US"), false, true, new string[]{"mm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicMillimeter, new CultureInfo("ru-RU"), false, true, new string[]{"мм³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicYard, new CultureInfo("en-US"), false, true, new string[]{"yd³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.CubicYard, new CultureInfo("ru-RU"), false, true, new string[]{"ярд³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Decaliter, new CultureInfo("en-US"), false, true, new string[]{"dal"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Decaliter, new CultureInfo("ru-RU"), false, true, new string[]{"дал"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.DecausGallon, new CultureInfo("en-US"), false, true, new string[]{"dagal (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.DecausGallon, new CultureInfo("ru-RU"), false, true, new string[]{"даАмериканский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Deciliter, new CultureInfo("en-US"), false, true, new string[]{"dl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Deciliter, new CultureInfo("ru-RU"), false, true, new string[]{"дл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.DeciusGallon, new CultureInfo("en-US"), false, true, new string[]{"dgal (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.DeciusGallon, new CultureInfo("ru-RU"), false, true, new string[]{"дАмериканский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.HectocubicFoot, new CultureInfo("en-US"), false, true, new string[]{"hft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.HectocubicFoot, new CultureInfo("ru-RU"), false, true, new string[]{"гфут³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.HectocubicMeter, new CultureInfo("en-US"), false, true, new string[]{"hm³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.HectocubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"гм³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Hectoliter, new CultureInfo("en-US"), false, true, new string[]{"hl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Hectoliter, new CultureInfo("ru-RU"), false, true, new string[]{"гл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.HectousGallon, new CultureInfo("en-US"), false, true, new string[]{"hgal (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.HectousGallon, new CultureInfo("ru-RU"), false, true, new string[]{"гАмериканский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.ImperialBeerBarrel, new CultureInfo("en-US"), false, true, new string[]{"bl (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.ImperialGallon, new CultureInfo("en-US"), false, true, new string[]{"gal (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.ImperialGallon, new CultureInfo("ru-RU"), false, true, new string[]{"Английский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.ImperialOunce, new CultureInfo("en-US"), false, true, new string[]{"oz (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.ImperialOunce, new CultureInfo("ru-RU"), false, true, new string[]{"Английская унция"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.ImperialPint, new CultureInfo("en-US"), false, true, new string[]{"pt (imp.)", "UK pt", "pt", "p"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.ImperialQuart, new CultureInfo("en-US"), false, true, new string[]{"qt (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KilocubicFoot, new CultureInfo("en-US"), false, true, new string[]{"kft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KilocubicFoot, new CultureInfo("ru-RU"), false, true, new string[]{"кфут³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KilocubicMeter, new CultureInfo("en-US"), false, true, new string[]{"km³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KilocubicMeter, new CultureInfo("ru-RU"), false, true, new string[]{"км³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KiloimperialGallon, new CultureInfo("en-US"), false, true, new string[]{"kgal (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KiloimperialGallon, new CultureInfo("ru-RU"), false, true, new string[]{"кАнглийский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Kiloliter, new CultureInfo("en-US"), false, true, new string[]{"kl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Kiloliter, new CultureInfo("ru-RU"), false, true, new string[]{"кл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KilousGallon, new CultureInfo("en-US"), false, true, new string[]{"kgal (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.KilousGallon, new CultureInfo("ru-RU"), false, true, new string[]{"кАмериканский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Liter, new CultureInfo("en-US"), false, true, new string[]{"l"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Liter, new CultureInfo("ru-RU"), false, true, new string[]{"л"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MegacubicFoot, new CultureInfo("en-US"), false, true, new string[]{"Mft³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MegacubicFoot, new CultureInfo("ru-RU"), false, true, new string[]{"Мфут³"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MegaimperialGallon, new CultureInfo("en-US"), false, true, new string[]{"Mgal (imp.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MegaimperialGallon, new CultureInfo("ru-RU"), false, true, new string[]{"МАнглийский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Megaliter, new CultureInfo("en-US"), false, true, new string[]{"Ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Megaliter, new CultureInfo("ru-RU"), false, true, new string[]{"Мл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MegausGallon, new CultureInfo("en-US"), false, true, new string[]{"Mgal (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MegausGallon, new CultureInfo("ru-RU"), false, true, new string[]{"МАмериканский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MetricCup, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MetricTeaspoon, new CultureInfo("en-US"), false, true, new string[]{"tsp", "t", "ts", "tspn", "t.", "ts.", "tsp.", "tspn.", "teaspoon"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MetricTeaspoon, new CultureInfo("ru-RU"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.MetricTeaspoon, new CultureInfo("nb-NO"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Microliter, new CultureInfo("en-US"), false, true, new string[]{"µl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Microliter, new CultureInfo("ru-RU"), false, true, new string[]{"мкл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Milliliter, new CultureInfo("en-US"), false, true, new string[]{"ml"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Milliliter, new CultureInfo("ru-RU"), false, true, new string[]{"мл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Nanoliter, new CultureInfo("en-US"), false, true, new string[]{"nl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.Nanoliter, new CultureInfo("ru-RU"), false, true, new string[]{"нл"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.OilBarrel, new CultureInfo("en-US"), false, true, new string[]{"bbl"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UkTablespoon, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UkTablespoon, new CultureInfo("ru-RU"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UkTablespoon, new CultureInfo("nb-NO"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsBeerBarrel, new CultureInfo("en-US"), false, true, new string[]{"bl (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsCustomaryCup, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsGallon, new CultureInfo("en-US"), false, true, new string[]{"gal (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsGallon, new CultureInfo("ru-RU"), false, true, new string[]{"Американский галлон"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsLegalCup, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsOunce, new CultureInfo("en-US"), false, true, new string[]{"oz (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsOunce, new CultureInfo("ru-RU"), false, true, new string[]{"Американская унция"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsPint, new CultureInfo("en-US"), false, true, new string[]{"pt (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsQuart, new CultureInfo("en-US"), false, true, new string[]{"qt (U.S.)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsTablespoon, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsTablespoon, new CultureInfo("ru-RU"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsTablespoon, new CultureInfo("nb-NO"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsTeaspoon, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsTeaspoon, new CultureInfo("ru-RU"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeUnit.UsTeaspoon, new CultureInfo("nb-NO"), false, true, new string[]{""}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs index 991cde53af..4532b55448 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs @@ -68,26 +68,26 @@ static VolumeConcentration() Info = new QuantityInfo("VolumeConcentration", new UnitInfo[] { - new UnitInfo(VolumeConcentrationUnit.CentilitersPerLiter, "CentilitersPerLiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.CentilitersPerMililiter, "CentilitersPerMililiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.DecilitersPerLiter, "DecilitersPerLiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.DecilitersPerMililiter, "DecilitersPerMililiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.DecimalFraction, "DecimalFractions", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.LitersPerLiter, "LitersPerLiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.LitersPerMililiter, "LitersPerMililiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.MicrolitersPerLiter, "MicrolitersPerLiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.MicrolitersPerMililiter, "MicrolitersPerMililiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.MillilitersPerLiter, "MillilitersPerLiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.MillilitersPerMililiter, "MillilitersPerMililiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.NanolitersPerLiter, "NanolitersPerLiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.NanolitersPerMililiter, "NanolitersPerMililiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.PartPerBillion, "PartsPerBillion", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.PartPerMillion, "PartsPerMillion", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.PartPerThousand, "PartsPerThousand", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.PartPerTrillion, "PartsPerTrillion", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.Percent, "Percent", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.PicolitersPerLiter, "PicolitersPerLiter", BaseUnits.Undefined), - new UnitInfo(VolumeConcentrationUnit.PicolitersPerMililiter, "PicolitersPerMililiter", BaseUnits.Undefined), + new UnitInfo(VolumeConcentrationUnit.CentilitersPerLiter, "CentilitersPerLiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.CentilitersPerMililiter, "CentilitersPerMililiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.DecilitersPerLiter, "DecilitersPerLiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.DecilitersPerMililiter, "DecilitersPerMililiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.DecimalFraction, "DecimalFractions", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.LitersPerLiter, "LitersPerLiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.LitersPerMililiter, "LitersPerMililiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.MicrolitersPerLiter, "MicrolitersPerLiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.MicrolitersPerMililiter, "MicrolitersPerMililiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.MillilitersPerLiter, "MillilitersPerLiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.MillilitersPerMililiter, "MillilitersPerMililiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.NanolitersPerLiter, "NanolitersPerLiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.NanolitersPerMililiter, "NanolitersPerMililiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.PartPerBillion, "PartsPerBillion", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.PartPerMillion, "PartsPerMillion", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.PartPerThousand, "PartsPerThousand", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.PartPerTrillion, "PartsPerTrillion", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.Percent, "Percent", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.PicolitersPerLiter, "PicolitersPerLiter", BaseUnits.Undefined, "VolumeConcentration"), + new UnitInfo(VolumeConcentrationUnit.PicolitersPerMililiter, "PicolitersPerMililiter", BaseUnits.Undefined, "VolumeConcentration"), }, BaseUnit, Zero, BaseDimensions); @@ -347,30 +347,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(VolumeConcentrationUnit.DecimalFraction, VolumeConcentrationUnit.PicolitersPerMililiter, quantity => quantity.ToUnit(VolumeConcentrationUnit.PicolitersPerMililiter)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.CentilitersPerLiter, new CultureInfo("en-US"), false, true, new string[]{"cL/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.CentilitersPerMililiter, new CultureInfo("en-US"), false, true, new string[]{"cL/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.DecilitersPerLiter, new CultureInfo("en-US"), false, true, new string[]{"dL/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.DecilitersPerMililiter, new CultureInfo("en-US"), false, true, new string[]{"dL/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.DecimalFraction, new CultureInfo("en-US"), false, true, new string[]{""}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.LitersPerLiter, new CultureInfo("en-US"), false, true, new string[]{"L/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.LitersPerMililiter, new CultureInfo("en-US"), false, true, new string[]{"L/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.MicrolitersPerLiter, new CultureInfo("en-US"), false, true, new string[]{"µL/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.MicrolitersPerMililiter, new CultureInfo("en-US"), false, true, new string[]{"µL/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.MillilitersPerLiter, new CultureInfo("en-US"), false, true, new string[]{"mL/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.MillilitersPerMililiter, new CultureInfo("en-US"), false, true, new string[]{"mL/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.NanolitersPerLiter, new CultureInfo("en-US"), false, true, new string[]{"nL/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.NanolitersPerMililiter, new CultureInfo("en-US"), false, true, new string[]{"nL/mL"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.PartPerBillion, new CultureInfo("en-US"), false, true, new string[]{"ppb"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.PartPerMillion, new CultureInfo("en-US"), false, true, new string[]{"ppm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.PartPerThousand, new CultureInfo("en-US"), false, true, new string[]{"‰"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.PartPerTrillion, new CultureInfo("en-US"), false, true, new string[]{"ppt"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.Percent, new CultureInfo("en-US"), false, true, new string[]{"%", "% (v/v)"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.PicolitersPerLiter, new CultureInfo("en-US"), false, true, new string[]{"pL/L"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeConcentrationUnit.PicolitersPerMililiter, new CultureInfo("en-US"), false, true, new string[]{"pL/mL"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs index 1575560297..c00f4c970f 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs @@ -65,73 +65,73 @@ static VolumeFlow() Info = new QuantityInfo("VolumeFlow", new UnitInfo[] { - new UnitInfo(VolumeFlowUnit.AcreFootPerDay, "AcreFeetPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.AcreFootPerHour, "AcreFeetPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.AcreFootPerMinute, "AcreFeetPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.AcreFootPerSecond, "AcreFeetPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CentiliterPerDay, "CentilitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CentiliterPerHour, "CentilitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CentiliterPerMinute, "CentilitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CentiliterPerSecond, "CentilitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicCentimeterPerMinute, "CubicCentimetersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicDecimeterPerMinute, "CubicDecimetersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicFootPerHour, "CubicFeetPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicFootPerMinute, "CubicFeetPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicFootPerSecond, "CubicFeetPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicMeterPerDay, "CubicMetersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicMeterPerHour, "CubicMetersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicMeterPerMinute, "CubicMetersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicMeterPerSecond, "CubicMetersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicMillimeterPerSecond, "CubicMillimetersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicYardPerDay, "CubicYardsPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicYardPerHour, "CubicYardsPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicYardPerMinute, "CubicYardsPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.CubicYardPerSecond, "CubicYardsPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.DeciliterPerDay, "DecilitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.DeciliterPerHour, "DecilitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.DeciliterPerMinute, "DecilitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.DeciliterPerSecond, "DecilitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.KiloliterPerDay, "KilolitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.KiloliterPerHour, "KilolitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.KiloliterPerMinute, "KilolitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.KiloliterPerSecond, "KilolitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.KilousGallonPerMinute, "KilousGallonsPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.LiterPerDay, "LitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.LiterPerHour, "LitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.LiterPerMinute, "LitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.LiterPerSecond, "LitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MegaliterPerDay, "MegalitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MegaliterPerHour, "MegalitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MegaliterPerMinute, "MegalitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MegaliterPerSecond, "MegalitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MegaukGallonPerDay, "MegaukGallonsPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MegaukGallonPerSecond, "MegaukGallonsPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MegausGallonPerDay, "MegausGallonsPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MicroliterPerDay, "MicrolitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MicroliterPerHour, "MicrolitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MicroliterPerMinute, "MicrolitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MicroliterPerSecond, "MicrolitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MilliliterPerDay, "MillilitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MilliliterPerHour, "MillilitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MilliliterPerMinute, "MillilitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MilliliterPerSecond, "MillilitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.MillionUsGallonPerDay, "MillionUsGallonsPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.NanoliterPerDay, "NanolitersPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.NanoliterPerHour, "NanolitersPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.NanoliterPerMinute, "NanolitersPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.NanoliterPerSecond, "NanolitersPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.OilBarrelPerDay, "OilBarrelsPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.OilBarrelPerHour, "OilBarrelsPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.OilBarrelPerMinute, "OilBarrelsPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.OilBarrelPerSecond, "OilBarrelsPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UkGallonPerDay, "UkGallonsPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UkGallonPerHour, "UkGallonsPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UkGallonPerMinute, "UkGallonsPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UkGallonPerSecond, "UkGallonsPerSecond", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UsGallonPerDay, "UsGallonsPerDay", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UsGallonPerHour, "UsGallonsPerHour", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UsGallonPerMinute, "UsGallonsPerMinute", BaseUnits.Undefined), - new UnitInfo(VolumeFlowUnit.UsGallonPerSecond, "UsGallonsPerSecond", BaseUnits.Undefined), + new UnitInfo(VolumeFlowUnit.AcreFootPerDay, "AcreFeetPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.AcreFootPerHour, "AcreFeetPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.AcreFootPerMinute, "AcreFeetPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.AcreFootPerSecond, "AcreFeetPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CentiliterPerDay, "CentilitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CentiliterPerHour, "CentilitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CentiliterPerMinute, "CentilitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CentiliterPerSecond, "CentilitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicCentimeterPerMinute, "CubicCentimetersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicDecimeterPerMinute, "CubicDecimetersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicFootPerHour, "CubicFeetPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicFootPerMinute, "CubicFeetPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicFootPerSecond, "CubicFeetPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicMeterPerDay, "CubicMetersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicMeterPerHour, "CubicMetersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicMeterPerMinute, "CubicMetersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicMeterPerSecond, "CubicMetersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicMillimeterPerSecond, "CubicMillimetersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicYardPerDay, "CubicYardsPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicYardPerHour, "CubicYardsPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicYardPerMinute, "CubicYardsPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.CubicYardPerSecond, "CubicYardsPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.DeciliterPerDay, "DecilitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.DeciliterPerHour, "DecilitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.DeciliterPerMinute, "DecilitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.DeciliterPerSecond, "DecilitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.KiloliterPerDay, "KilolitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.KiloliterPerHour, "KilolitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.KiloliterPerMinute, "KilolitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.KiloliterPerSecond, "KilolitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.KilousGallonPerMinute, "KilousGallonsPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.LiterPerDay, "LitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.LiterPerHour, "LitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.LiterPerMinute, "LitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.LiterPerSecond, "LitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MegaliterPerDay, "MegalitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MegaliterPerHour, "MegalitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MegaliterPerMinute, "MegalitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MegaliterPerSecond, "MegalitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MegaukGallonPerDay, "MegaukGallonsPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MegaukGallonPerSecond, "MegaukGallonsPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MegausGallonPerDay, "MegausGallonsPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MicroliterPerDay, "MicrolitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MicroliterPerHour, "MicrolitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MicroliterPerMinute, "MicrolitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MicroliterPerSecond, "MicrolitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MilliliterPerDay, "MillilitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MilliliterPerHour, "MillilitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MilliliterPerMinute, "MillilitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MilliliterPerSecond, "MillilitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.MillionUsGallonPerDay, "MillionUsGallonsPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.NanoliterPerDay, "NanolitersPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.NanoliterPerHour, "NanolitersPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.NanoliterPerMinute, "NanolitersPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.NanoliterPerSecond, "NanolitersPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.OilBarrelPerDay, "OilBarrelsPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.OilBarrelPerHour, "OilBarrelsPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.OilBarrelPerMinute, "OilBarrelsPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.OilBarrelPerSecond, "OilBarrelsPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UkGallonPerDay, "UkGallonsPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UkGallonPerHour, "UkGallonsPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UkGallonPerMinute, "UkGallonsPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UkGallonPerSecond, "UkGallonsPerSecond", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UsGallonPerDay, "UsGallonsPerDay", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UsGallonPerHour, "UsGallonsPerHour", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UsGallonPerMinute, "UsGallonsPerMinute", BaseUnits.Undefined, "VolumeFlow"), + new UnitInfo(VolumeFlowUnit.UsGallonPerSecond, "UsGallonsPerSecond", BaseUnits.Undefined, "VolumeFlow"), }, BaseUnit, Zero, BaseDimensions); @@ -720,107 +720,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(VolumeFlowUnit.CubicMeterPerSecond, VolumeFlowUnit.UsGallonPerSecond, quantity => quantity.ToUnit(VolumeFlowUnit.UsGallonPerSecond)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.AcreFootPerDay, new CultureInfo("en-US"), false, true, new string[]{"af/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.AcreFootPerHour, new CultureInfo("en-US"), false, true, new string[]{"af/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.AcreFootPerMinute, new CultureInfo("en-US"), false, true, new string[]{"af/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.AcreFootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"af/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CentiliterPerDay, new CultureInfo("en-US"), false, true, new string[]{"cl/day", "cL/d", "cLPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CentiliterPerHour, new CultureInfo("en-US"), false, true, new string[]{"cL/h", "cLPH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CentiliterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"сл/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CentiliterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"cL/min", "cLPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CentiliterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"сл/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CentiliterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"cL/s", "cLPS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CentiliterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"сл/c"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicCentimeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"cm³/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicCentimeterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"см³/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicDecimeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"dm³/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicDecimeterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"дм³/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicFootPerHour, new CultureInfo("en-US"), false, true, new string[]{"ft³/h", "cf/hr"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicFootPerMinute, new CultureInfo("en-US"), false, true, new string[]{"ft³/min", "CFM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicFootPerSecond, new CultureInfo("en-US"), false, true, new string[]{"ft³/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMeterPerDay, new CultureInfo("en-US"), false, true, new string[]{"m³/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMeterPerHour, new CultureInfo("en-US"), false, true, new string[]{"m³/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMeterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"м³/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMeterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"m³/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMeterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"м³/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"m³/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMeterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"м³/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMillimeterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mm³/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicMillimeterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мм³/с"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicYardPerDay, new CultureInfo("en-US"), false, true, new string[]{"cy/day"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicYardPerHour, new CultureInfo("en-US"), false, true, new string[]{"yd³/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicYardPerMinute, new CultureInfo("en-US"), false, true, new string[]{"yd³/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.CubicYardPerSecond, new CultureInfo("en-US"), false, true, new string[]{"yd³/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.DeciliterPerDay, new CultureInfo("en-US"), false, true, new string[]{"dl/day", "dL/d", "dLPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.DeciliterPerHour, new CultureInfo("en-US"), false, true, new string[]{"dL/h", "dLPH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.DeciliterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"дл/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.DeciliterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"dL/min", "dLPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.DeciliterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"дл/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.DeciliterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"dL/s", "dLPS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.DeciliterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"дл/c"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KiloliterPerDay, new CultureInfo("en-US"), false, true, new string[]{"kl/day", "kL/d", "kLPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KiloliterPerHour, new CultureInfo("en-US"), false, true, new string[]{"kL/h", "kLPH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KiloliterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"кл/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KiloliterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"kL/min", "kLPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KiloliterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"кл/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KiloliterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"kL/s", "kLPS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KiloliterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"кл/c"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.KilousGallonPerMinute, new CultureInfo("en-US"), false, true, new string[]{"kgal (U.S.)/min", "KGPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.LiterPerDay, new CultureInfo("en-US"), false, true, new string[]{"l/day", "L/d", "LPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.LiterPerHour, new CultureInfo("en-US"), false, true, new string[]{"L/h", "LPH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.LiterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"л/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.LiterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"L/min", "LPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.LiterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"л/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.LiterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"L/s", "LPS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.LiterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"л/c"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MegaliterPerDay, new CultureInfo("en-US"), false, true, new string[]{"Ml/day", "ML/d", "MLPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MegaliterPerHour, new CultureInfo("en-US"), false, true, new string[]{"ML/h", "MLPH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MegaliterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"Мл/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MegaliterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"ML/min", "MLPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MegaliterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"Мл/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MegaliterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"ML/s", "MLPS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MegaliterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"Мл/c"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MegaukGallonPerDay, new CultureInfo("en-US"), false, true, new string[]{"Mgal (U. K.)/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MegaukGallonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"Mgal (imp.)/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MegausGallonPerDay, new CultureInfo("en-US"), false, true, new string[]{"Mgpd", "Mgal/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MicroliterPerDay, new CultureInfo("en-US"), false, true, new string[]{"µl/day", "µL/d", "µLPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MicroliterPerHour, new CultureInfo("en-US"), false, true, new string[]{"µL/h", "µLPH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MicroliterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"мкл/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MicroliterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"µL/min", "µLPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MicroliterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"мкл/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MicroliterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"µL/s", "µLPS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MicroliterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мкл/c"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MilliliterPerDay, new CultureInfo("en-US"), false, true, new string[]{"ml/day", "mL/d", "mLPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MilliliterPerHour, new CultureInfo("en-US"), false, true, new string[]{"mL/h", "mLPH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MilliliterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"мл/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MilliliterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"mL/min", "mLPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MilliliterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"мл/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MilliliterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"mL/s", "mLPS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MilliliterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"мл/c"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.MillionUsGallonPerDay, new CultureInfo("en-US"), false, true, new string[]{"MGD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.NanoliterPerDay, new CultureInfo("en-US"), false, true, new string[]{"nl/day", "nL/d", "nLPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.NanoliterPerHour, new CultureInfo("en-US"), false, true, new string[]{"nL/h", "nLPH"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.NanoliterPerHour, new CultureInfo("ru-RU"), false, true, new string[]{"нл/ч"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.NanoliterPerMinute, new CultureInfo("en-US"), false, true, new string[]{"nL/min", "nLPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.NanoliterPerMinute, new CultureInfo("ru-RU"), false, true, new string[]{"нл/мин"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.NanoliterPerSecond, new CultureInfo("en-US"), false, true, new string[]{"nL/s", "nLPS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.NanoliterPerSecond, new CultureInfo("ru-RU"), false, true, new string[]{"нл/c"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.OilBarrelPerDay, new CultureInfo("en-US"), false, true, new string[]{"bbl/d", "BOPD"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.OilBarrelPerHour, new CultureInfo("en-US"), false, true, new string[]{"bbl/hr", "bph"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.OilBarrelPerMinute, new CultureInfo("en-US"), false, true, new string[]{"bbl/min", "bpm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.OilBarrelPerSecond, new CultureInfo("en-US"), false, true, new string[]{"bbl/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UkGallonPerDay, new CultureInfo("en-US"), false, true, new string[]{"gal (U. K.)/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UkGallonPerHour, new CultureInfo("en-US"), false, true, new string[]{"gal (imp.)/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UkGallonPerMinute, new CultureInfo("en-US"), false, true, new string[]{"gal (imp.)/min"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UkGallonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"gal (imp.)/s"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UsGallonPerDay, new CultureInfo("en-US"), false, true, new string[]{"gpd", "gal/d"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UsGallonPerHour, new CultureInfo("en-US"), false, true, new string[]{"gal (U.S.)/h"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UsGallonPerMinute, new CultureInfo("en-US"), false, true, new string[]{"gal (U.S.)/min", "GPM"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowUnit.UsGallonPerSecond, new CultureInfo("en-US"), false, true, new string[]{"gal (U.S.)/s"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs index 363bc1e180..16afc4d4b1 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs @@ -65,8 +65,8 @@ static VolumeFlowPerArea() Info = new QuantityInfo("VolumeFlowPerArea", new UnitInfo[] { - new UnitInfo(VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot, "CubicFeetPerMinutePerSquareFoot", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Minute)), - new UnitInfo(VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter, "CubicMetersPerSecondPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second)), + new UnitInfo(VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot, "CubicFeetPerMinutePerSquareFoot", new BaseUnits(length: LengthUnit.Foot, time: DurationUnit.Minute), "VolumeFlowPerArea"), + new UnitInfo(VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter, "CubicMetersPerSecondPerSquareMeter", new BaseUnits(length: LengthUnit.Meter, time: DurationUnit.Second), "VolumeFlowPerArea"), }, BaseUnit, Zero, BaseDimensions); @@ -200,12 +200,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter, VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot, quantity => quantity.ToUnit(VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot, new CultureInfo("en-US"), false, true, new string[]{"CFM/ft²"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter, new CultureInfo("en-US"), false, true, new string[]{"m³/(s·m²)"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs index c3c5d1005f..93679f9c02 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs @@ -65,15 +65,15 @@ static VolumePerLength() Info = new QuantityInfo("VolumePerLength", new UnitInfo[] { - new UnitInfo(VolumePerLengthUnit.CubicMeterPerMeter, "CubicMetersPerMeter", new BaseUnits(length: LengthUnit.Meter)), - new UnitInfo(VolumePerLengthUnit.CubicYardPerFoot, "CubicYardsPerFoot", BaseUnits.Undefined), - new UnitInfo(VolumePerLengthUnit.CubicYardPerUsSurveyFoot, "CubicYardsPerUsSurveyFoot", BaseUnits.Undefined), - new UnitInfo(VolumePerLengthUnit.ImperialGallonPerMile, "ImperialGallonsPerMile", BaseUnits.Undefined), - new UnitInfo(VolumePerLengthUnit.LiterPerKilometer, "LitersPerKilometer", BaseUnits.Undefined), - new UnitInfo(VolumePerLengthUnit.LiterPerMeter, "LitersPerMeter", new BaseUnits(length: LengthUnit.Decimeter)), - new UnitInfo(VolumePerLengthUnit.LiterPerMillimeter, "LitersPerMillimeter", BaseUnits.Undefined), - new UnitInfo(VolumePerLengthUnit.OilBarrelPerFoot, "OilBarrelsPerFoot", BaseUnits.Undefined), - new UnitInfo(VolumePerLengthUnit.UsGallonPerMile, "UsGallonsPerMile", BaseUnits.Undefined), + new UnitInfo(VolumePerLengthUnit.CubicMeterPerMeter, "CubicMetersPerMeter", new BaseUnits(length: LengthUnit.Meter), "VolumePerLength"), + new UnitInfo(VolumePerLengthUnit.CubicYardPerFoot, "CubicYardsPerFoot", BaseUnits.Undefined, "VolumePerLength"), + new UnitInfo(VolumePerLengthUnit.CubicYardPerUsSurveyFoot, "CubicYardsPerUsSurveyFoot", BaseUnits.Undefined, "VolumePerLength"), + new UnitInfo(VolumePerLengthUnit.ImperialGallonPerMile, "ImperialGallonsPerMile", BaseUnits.Undefined, "VolumePerLength"), + new UnitInfo(VolumePerLengthUnit.LiterPerKilometer, "LitersPerKilometer", BaseUnits.Undefined, "VolumePerLength"), + new UnitInfo(VolumePerLengthUnit.LiterPerMeter, "LitersPerMeter", new BaseUnits(length: LengthUnit.Decimeter), "VolumePerLength"), + new UnitInfo(VolumePerLengthUnit.LiterPerMillimeter, "LitersPerMillimeter", BaseUnits.Undefined, "VolumePerLength"), + new UnitInfo(VolumePerLengthUnit.OilBarrelPerFoot, "OilBarrelsPerFoot", BaseUnits.Undefined, "VolumePerLength"), + new UnitInfo(VolumePerLengthUnit.UsGallonPerMile, "UsGallonsPerMile", BaseUnits.Undefined, "VolumePerLength"), }, BaseUnit, Zero, BaseDimensions); @@ -256,19 +256,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(VolumePerLengthUnit.CubicMeterPerMeter, VolumePerLengthUnit.UsGallonPerMile, quantity => quantity.ToUnit(VolumePerLengthUnit.UsGallonPerMile)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.CubicMeterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"m³/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.CubicYardPerFoot, new CultureInfo("en-US"), false, true, new string[]{"yd³/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.CubicYardPerUsSurveyFoot, new CultureInfo("en-US"), false, true, new string[]{"yd³/ftUS"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.ImperialGallonPerMile, new CultureInfo("en-US"), false, true, new string[]{"gal (imp.)/mi"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.LiterPerKilometer, new CultureInfo("en-US"), false, true, new string[]{"l/km"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.LiterPerMeter, new CultureInfo("en-US"), false, true, new string[]{"l/m"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.LiterPerMillimeter, new CultureInfo("en-US"), false, true, new string[]{"l/mm"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.OilBarrelPerFoot, new CultureInfo("en-US"), false, true, new string[]{"bbl/ft"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumePerLengthUnit.UsGallonPerMile, new CultureInfo("en-US"), false, true, new string[]{"gal (U.S.)/mi"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs index e5e7fa821b..41ad70348e 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs @@ -68,15 +68,15 @@ static VolumetricHeatCapacity() Info = new QuantityInfo("VolumetricHeatCapacity", new UnitInfo[] { - new UnitInfo(VolumetricHeatCapacityUnit.BtuPerCubicFootDegreeFahrenheit, "BtusPerCubicFootDegreeFahrenheit", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.CaloriePerCubicCentimeterDegreeCelsius, "CaloriesPerCubicCentimeterDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.JoulePerCubicMeterDegreeCelsius, "JoulesPerCubicMeterDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin, "JoulesPerCubicMeterKelvin", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.KilocaloriePerCubicCentimeterDegreeCelsius, "KilocaloriesPerCubicCentimeterDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.KilojoulePerCubicMeterDegreeCelsius, "KilojoulesPerCubicMeterDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.KilojoulePerCubicMeterKelvin, "KilojoulesPerCubicMeterKelvin", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.MegajoulePerCubicMeterDegreeCelsius, "MegajoulesPerCubicMeterDegreeCelsius", BaseUnits.Undefined), - new UnitInfo(VolumetricHeatCapacityUnit.MegajoulePerCubicMeterKelvin, "MegajoulesPerCubicMeterKelvin", BaseUnits.Undefined), + new UnitInfo(VolumetricHeatCapacityUnit.BtuPerCubicFootDegreeFahrenheit, "BtusPerCubicFootDegreeFahrenheit", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.CaloriePerCubicCentimeterDegreeCelsius, "CaloriesPerCubicCentimeterDegreeCelsius", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.JoulePerCubicMeterDegreeCelsius, "JoulesPerCubicMeterDegreeCelsius", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin, "JoulesPerCubicMeterKelvin", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.KilocaloriePerCubicCentimeterDegreeCelsius, "KilocaloriesPerCubicCentimeterDegreeCelsius", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.KilojoulePerCubicMeterDegreeCelsius, "KilojoulesPerCubicMeterDegreeCelsius", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.KilojoulePerCubicMeterKelvin, "KilojoulesPerCubicMeterKelvin", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.MegajoulePerCubicMeterDegreeCelsius, "MegajoulesPerCubicMeterDegreeCelsius", BaseUnits.Undefined, "VolumetricHeatCapacity"), + new UnitInfo(VolumetricHeatCapacityUnit.MegajoulePerCubicMeterKelvin, "MegajoulesPerCubicMeterKelvin", BaseUnits.Undefined, "VolumetricHeatCapacity"), }, BaseUnit, Zero, BaseDimensions); @@ -259,19 +259,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin, VolumetricHeatCapacityUnit.MegajoulePerCubicMeterKelvin, quantity => quantity.ToUnit(VolumetricHeatCapacityUnit.MegajoulePerCubicMeterKelvin)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.BtuPerCubicFootDegreeFahrenheit, new CultureInfo("en-US"), false, true, new string[]{"BTU/ft³·°F"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.CaloriePerCubicCentimeterDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"cal/cm³·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.JoulePerCubicMeterDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"J/m³·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin, new CultureInfo("en-US"), false, true, new string[]{"J/m³·K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.KilocaloriePerCubicCentimeterDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"kcal/cm³·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.KilojoulePerCubicMeterDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"kJ/m³·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.KilojoulePerCubicMeterKelvin, new CultureInfo("en-US"), false, true, new string[]{"kJ/m³·K"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.MegajoulePerCubicMeterDegreeCelsius, new CultureInfo("en-US"), false, true, new string[]{"MJ/m³·°C"}); - unitAbbreviationsCache.PerformAbbreviationMapping(VolumetricHeatCapacityUnit.MegajoulePerCubicMeterKelvin, new CultureInfo("en-US"), false, true, new string[]{"MJ/m³·K"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs index 28149b6b1e..2b76faa903 100644 --- a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs @@ -65,12 +65,12 @@ static WarpingMomentOfInertia() Info = new QuantityInfo("WarpingMomentOfInertia", new UnitInfo[] { - new UnitInfo(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, "CentimetersToTheSixth", new BaseUnits(length: LengthUnit.Centimeter)), - new UnitInfo(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, "DecimetersToTheSixth", new BaseUnits(length: LengthUnit.Decimeter)), - new UnitInfo(WarpingMomentOfInertiaUnit.FootToTheSixth, "FeetToTheSixth", new BaseUnits(length: LengthUnit.Foot)), - new UnitInfo(WarpingMomentOfInertiaUnit.InchToTheSixth, "InchesToTheSixth", new BaseUnits(length: LengthUnit.Inch)), - new UnitInfo(WarpingMomentOfInertiaUnit.MeterToTheSixth, "MetersToTheSixth", new BaseUnits(length: LengthUnit.Meter)), - new UnitInfo(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, "MillimetersToTheSixth", new BaseUnits(length: LengthUnit.Millimeter)), + new UnitInfo(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, "CentimetersToTheSixth", new BaseUnits(length: LengthUnit.Centimeter), "WarpingMomentOfInertia"), + new UnitInfo(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, "DecimetersToTheSixth", new BaseUnits(length: LengthUnit.Decimeter), "WarpingMomentOfInertia"), + new UnitInfo(WarpingMomentOfInertiaUnit.FootToTheSixth, "FeetToTheSixth", new BaseUnits(length: LengthUnit.Foot), "WarpingMomentOfInertia"), + new UnitInfo(WarpingMomentOfInertiaUnit.InchToTheSixth, "InchesToTheSixth", new BaseUnits(length: LengthUnit.Inch), "WarpingMomentOfInertia"), + new UnitInfo(WarpingMomentOfInertiaUnit.MeterToTheSixth, "MetersToTheSixth", new BaseUnits(length: LengthUnit.Meter), "WarpingMomentOfInertia"), + new UnitInfo(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, "MillimetersToTheSixth", new BaseUnits(length: LengthUnit.Millimeter), "WarpingMomentOfInertia"), }, BaseUnit, Zero, BaseDimensions); @@ -232,16 +232,6 @@ internal static void RegisterDefaultConversions(UnitConverter unitConverter) unitConverter.SetConversionFunction(WarpingMomentOfInertiaUnit.MeterToTheSixth, WarpingMomentOfInertiaUnit.MillimeterToTheSixth, quantity => quantity.ToUnit(WarpingMomentOfInertiaUnit.MillimeterToTheSixth)); } - internal static void MapGeneratedLocalizations(UnitAbbreviationsCache unitAbbreviationsCache) - { - unitAbbreviationsCache.PerformAbbreviationMapping(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, new CultureInfo("en-US"), false, true, new string[]{"cm⁶", "cm^6"}); - unitAbbreviationsCache.PerformAbbreviationMapping(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, new CultureInfo("en-US"), false, true, new string[]{"dm⁶", "dm^6"}); - unitAbbreviationsCache.PerformAbbreviationMapping(WarpingMomentOfInertiaUnit.FootToTheSixth, new CultureInfo("en-US"), false, true, new string[]{"ft⁶", "ft^6"}); - unitAbbreviationsCache.PerformAbbreviationMapping(WarpingMomentOfInertiaUnit.InchToTheSixth, new CultureInfo("en-US"), false, true, new string[]{"in⁶", "in^6"}); - unitAbbreviationsCache.PerformAbbreviationMapping(WarpingMomentOfInertiaUnit.MeterToTheSixth, new CultureInfo("en-US"), false, true, new string[]{"m⁶", "m^6"}); - unitAbbreviationsCache.PerformAbbreviationMapping(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, new CultureInfo("en-US"), false, true, new string[]{"mm⁶", "mm^6"}); - } - /// /// Get unit abbreviation string. /// diff --git a/UnitsNet/GeneratedCode/Quantity.g.cs b/UnitsNet/GeneratedCode/Quantity.g.cs index d82413486f..1ce23e286b 100644 --- a/UnitsNet/GeneratedCode/Quantity.g.cs +++ b/UnitsNet/GeneratedCode/Quantity.g.cs @@ -31,7 +31,7 @@ namespace UnitsNet /// /// Dynamically parse or construct quantities when types are only known at runtime. /// - public static partial class Quantity + public partial class Quantity { /// /// All QuantityInfo instances mapped by quantity name that are present in UnitsNet by default. @@ -292,7 +292,7 @@ public static IQuantity FromQuantityInfo(QuantityInfo quantityInfo, QuantityValu "WarpingMomentOfInertia" => WarpingMomentOfInertia.From(value, WarpingMomentOfInertia.BaseUnit), _ => throw new ArgumentException($"{quantityInfo.Name} is not a supported quantity.") }; - } + } /// /// Try to dynamically construct a quantity. @@ -303,374 +303,131 @@ public static IQuantity FromQuantityInfo(QuantityInfo quantityInfo, QuantityValu /// True if successful with assigned the value, otherwise false. public static bool TryFrom(QuantityValue value, Enum? unit, [NotNullWhen(true)] out IQuantity? quantity) { - switch (unit) + quantity = unit switch { - case AbsorbedDoseOfIonizingRadiationUnit absorbedDoseOfIonizingRadiationUnit: - quantity = AbsorbedDoseOfIonizingRadiation.From(value, absorbedDoseOfIonizingRadiationUnit); - return true; - case AccelerationUnit accelerationUnit: - quantity = Acceleration.From(value, accelerationUnit); - return true; - case AmountOfSubstanceUnit amountOfSubstanceUnit: - quantity = AmountOfSubstance.From(value, amountOfSubstanceUnit); - return true; - case AmplitudeRatioUnit amplitudeRatioUnit: - quantity = AmplitudeRatio.From(value, amplitudeRatioUnit); - return true; - case AngleUnit angleUnit: - quantity = Angle.From(value, angleUnit); - return true; - case ApparentEnergyUnit apparentEnergyUnit: - quantity = ApparentEnergy.From(value, apparentEnergyUnit); - return true; - case ApparentPowerUnit apparentPowerUnit: - quantity = ApparentPower.From(value, apparentPowerUnit); - return true; - case AreaUnit areaUnit: - quantity = Area.From(value, areaUnit); - return true; - case AreaDensityUnit areaDensityUnit: - quantity = AreaDensity.From(value, areaDensityUnit); - return true; - case AreaMomentOfInertiaUnit areaMomentOfInertiaUnit: - quantity = AreaMomentOfInertia.From(value, areaMomentOfInertiaUnit); - return true; - case BitRateUnit bitRateUnit: - quantity = BitRate.From(value, bitRateUnit); - return true; - case BrakeSpecificFuelConsumptionUnit brakeSpecificFuelConsumptionUnit: - quantity = BrakeSpecificFuelConsumption.From(value, brakeSpecificFuelConsumptionUnit); - return true; - case CapacitanceUnit capacitanceUnit: - quantity = Capacitance.From(value, capacitanceUnit); - return true; - case CoefficientOfThermalExpansionUnit coefficientOfThermalExpansionUnit: - quantity = CoefficientOfThermalExpansion.From(value, coefficientOfThermalExpansionUnit); - return true; - case CompressibilityUnit compressibilityUnit: - quantity = Compressibility.From(value, compressibilityUnit); - return true; - case DensityUnit densityUnit: - quantity = Density.From(value, densityUnit); - return true; - case DurationUnit durationUnit: - quantity = Duration.From(value, durationUnit); - return true; - case DynamicViscosityUnit dynamicViscosityUnit: - quantity = DynamicViscosity.From(value, dynamicViscosityUnit); - return true; - case ElectricAdmittanceUnit electricAdmittanceUnit: - quantity = ElectricAdmittance.From(value, electricAdmittanceUnit); - return true; - case ElectricChargeUnit electricChargeUnit: - quantity = ElectricCharge.From(value, electricChargeUnit); - return true; - case ElectricChargeDensityUnit electricChargeDensityUnit: - quantity = ElectricChargeDensity.From(value, electricChargeDensityUnit); - return true; - case ElectricConductanceUnit electricConductanceUnit: - quantity = ElectricConductance.From(value, electricConductanceUnit); - return true; - case ElectricConductivityUnit electricConductivityUnit: - quantity = ElectricConductivity.From(value, electricConductivityUnit); - return true; - case ElectricCurrentUnit electricCurrentUnit: - quantity = ElectricCurrent.From(value, electricCurrentUnit); - return true; - case ElectricCurrentDensityUnit electricCurrentDensityUnit: - quantity = ElectricCurrentDensity.From(value, electricCurrentDensityUnit); - return true; - case ElectricCurrentGradientUnit electricCurrentGradientUnit: - quantity = ElectricCurrentGradient.From(value, electricCurrentGradientUnit); - return true; - case ElectricFieldUnit electricFieldUnit: - quantity = ElectricField.From(value, electricFieldUnit); - return true; - case ElectricInductanceUnit electricInductanceUnit: - quantity = ElectricInductance.From(value, electricInductanceUnit); - return true; - case ElectricPotentialUnit electricPotentialUnit: - quantity = ElectricPotential.From(value, electricPotentialUnit); - return true; - case ElectricPotentialAcUnit electricPotentialAcUnit: - quantity = ElectricPotentialAc.From(value, electricPotentialAcUnit); - return true; - case ElectricPotentialChangeRateUnit electricPotentialChangeRateUnit: - quantity = ElectricPotentialChangeRate.From(value, electricPotentialChangeRateUnit); - return true; - case ElectricPotentialDcUnit electricPotentialDcUnit: - quantity = ElectricPotentialDc.From(value, electricPotentialDcUnit); - return true; - case ElectricResistanceUnit electricResistanceUnit: - quantity = ElectricResistance.From(value, electricResistanceUnit); - return true; - case ElectricResistivityUnit electricResistivityUnit: - quantity = ElectricResistivity.From(value, electricResistivityUnit); - return true; - case ElectricSurfaceChargeDensityUnit electricSurfaceChargeDensityUnit: - quantity = ElectricSurfaceChargeDensity.From(value, electricSurfaceChargeDensityUnit); - return true; - case EnergyUnit energyUnit: - quantity = Energy.From(value, energyUnit); - return true; - case EnergyDensityUnit energyDensityUnit: - quantity = EnergyDensity.From(value, energyDensityUnit); - return true; - case EntropyUnit entropyUnit: - quantity = Entropy.From(value, entropyUnit); - return true; - case ForceUnit forceUnit: - quantity = Force.From(value, forceUnit); - return true; - case ForceChangeRateUnit forceChangeRateUnit: - quantity = ForceChangeRate.From(value, forceChangeRateUnit); - return true; - case ForcePerLengthUnit forcePerLengthUnit: - quantity = ForcePerLength.From(value, forcePerLengthUnit); - return true; - case FrequencyUnit frequencyUnit: - quantity = Frequency.From(value, frequencyUnit); - return true; - case FuelEfficiencyUnit fuelEfficiencyUnit: - quantity = FuelEfficiency.From(value, fuelEfficiencyUnit); - return true; - case HeatFluxUnit heatFluxUnit: - quantity = HeatFlux.From(value, heatFluxUnit); - return true; - case HeatTransferCoefficientUnit heatTransferCoefficientUnit: - quantity = HeatTransferCoefficient.From(value, heatTransferCoefficientUnit); - return true; - case IlluminanceUnit illuminanceUnit: - quantity = Illuminance.From(value, illuminanceUnit); - return true; - case ImpulseUnit impulseUnit: - quantity = Impulse.From(value, impulseUnit); - return true; - case InformationUnit informationUnit: - quantity = Information.From(value, informationUnit); - return true; - case IrradianceUnit irradianceUnit: - quantity = Irradiance.From(value, irradianceUnit); - return true; - case IrradiationUnit irradiationUnit: - quantity = Irradiation.From(value, irradiationUnit); - return true; - case JerkUnit jerkUnit: - quantity = Jerk.From(value, jerkUnit); - return true; - case KinematicViscosityUnit kinematicViscosityUnit: - quantity = KinematicViscosity.From(value, kinematicViscosityUnit); - return true; - case LeakRateUnit leakRateUnit: - quantity = LeakRate.From(value, leakRateUnit); - return true; - case LengthUnit lengthUnit: - quantity = Length.From(value, lengthUnit); - return true; - case LevelUnit levelUnit: - quantity = Level.From(value, levelUnit); - return true; - case LinearDensityUnit linearDensityUnit: - quantity = LinearDensity.From(value, linearDensityUnit); - return true; - case LinearPowerDensityUnit linearPowerDensityUnit: - quantity = LinearPowerDensity.From(value, linearPowerDensityUnit); - return true; - case LuminanceUnit luminanceUnit: - quantity = Luminance.From(value, luminanceUnit); - return true; - case LuminosityUnit luminosityUnit: - quantity = Luminosity.From(value, luminosityUnit); - return true; - case LuminousFluxUnit luminousFluxUnit: - quantity = LuminousFlux.From(value, luminousFluxUnit); - return true; - case LuminousIntensityUnit luminousIntensityUnit: - quantity = LuminousIntensity.From(value, luminousIntensityUnit); - return true; - case MagneticFieldUnit magneticFieldUnit: - quantity = MagneticField.From(value, magneticFieldUnit); - return true; - case MagneticFluxUnit magneticFluxUnit: - quantity = MagneticFlux.From(value, magneticFluxUnit); - return true; - case MagnetizationUnit magnetizationUnit: - quantity = Magnetization.From(value, magnetizationUnit); - return true; - case MassUnit massUnit: - quantity = Mass.From(value, massUnit); - return true; - case MassConcentrationUnit massConcentrationUnit: - quantity = MassConcentration.From(value, massConcentrationUnit); - return true; - case MassFlowUnit massFlowUnit: - quantity = MassFlow.From(value, massFlowUnit); - return true; - case MassFluxUnit massFluxUnit: - quantity = MassFlux.From(value, massFluxUnit); - return true; - case MassFractionUnit massFractionUnit: - quantity = MassFraction.From(value, massFractionUnit); - return true; - case MassMomentOfInertiaUnit massMomentOfInertiaUnit: - quantity = MassMomentOfInertia.From(value, massMomentOfInertiaUnit); - return true; - case MolarEnergyUnit molarEnergyUnit: - quantity = MolarEnergy.From(value, molarEnergyUnit); - return true; - case MolarEntropyUnit molarEntropyUnit: - quantity = MolarEntropy.From(value, molarEntropyUnit); - return true; - case MolarFlowUnit molarFlowUnit: - quantity = MolarFlow.From(value, molarFlowUnit); - return true; - case MolarityUnit molarityUnit: - quantity = Molarity.From(value, molarityUnit); - return true; - case MolarMassUnit molarMassUnit: - quantity = MolarMass.From(value, molarMassUnit); - return true; - case PermeabilityUnit permeabilityUnit: - quantity = Permeability.From(value, permeabilityUnit); - return true; - case PermittivityUnit permittivityUnit: - quantity = Permittivity.From(value, permittivityUnit); - return true; - case PorousMediumPermeabilityUnit porousMediumPermeabilityUnit: - quantity = PorousMediumPermeability.From(value, porousMediumPermeabilityUnit); - return true; - case PowerUnit powerUnit: - quantity = Power.From(value, powerUnit); - return true; - case PowerDensityUnit powerDensityUnit: - quantity = PowerDensity.From(value, powerDensityUnit); - return true; - case PowerRatioUnit powerRatioUnit: - quantity = PowerRatio.From(value, powerRatioUnit); - return true; - case PressureUnit pressureUnit: - quantity = Pressure.From(value, pressureUnit); - return true; - case PressureChangeRateUnit pressureChangeRateUnit: - quantity = PressureChangeRate.From(value, pressureChangeRateUnit); - return true; - case RatioUnit ratioUnit: - quantity = Ratio.From(value, ratioUnit); - return true; - case RatioChangeRateUnit ratioChangeRateUnit: - quantity = RatioChangeRate.From(value, ratioChangeRateUnit); - return true; - case ReactiveEnergyUnit reactiveEnergyUnit: - quantity = ReactiveEnergy.From(value, reactiveEnergyUnit); - return true; - case ReactivePowerUnit reactivePowerUnit: - quantity = ReactivePower.From(value, reactivePowerUnit); - return true; - case ReciprocalAreaUnit reciprocalAreaUnit: - quantity = ReciprocalArea.From(value, reciprocalAreaUnit); - return true; - case ReciprocalLengthUnit reciprocalLengthUnit: - quantity = ReciprocalLength.From(value, reciprocalLengthUnit); - return true; - case RelativeHumidityUnit relativeHumidityUnit: - quantity = RelativeHumidity.From(value, relativeHumidityUnit); - return true; - case RotationalAccelerationUnit rotationalAccelerationUnit: - quantity = RotationalAcceleration.From(value, rotationalAccelerationUnit); - return true; - case RotationalSpeedUnit rotationalSpeedUnit: - quantity = RotationalSpeed.From(value, rotationalSpeedUnit); - return true; - case RotationalStiffnessUnit rotationalStiffnessUnit: - quantity = RotationalStiffness.From(value, rotationalStiffnessUnit); - return true; - case RotationalStiffnessPerLengthUnit rotationalStiffnessPerLengthUnit: - quantity = RotationalStiffnessPerLength.From(value, rotationalStiffnessPerLengthUnit); - return true; - case ScalarUnit scalarUnit: - quantity = Scalar.From(value, scalarUnit); - return true; - case SolidAngleUnit solidAngleUnit: - quantity = SolidAngle.From(value, solidAngleUnit); - return true; - case SpecificEnergyUnit specificEnergyUnit: - quantity = SpecificEnergy.From(value, specificEnergyUnit); - return true; - case SpecificEntropyUnit specificEntropyUnit: - quantity = SpecificEntropy.From(value, specificEntropyUnit); - return true; - case SpecificFuelConsumptionUnit specificFuelConsumptionUnit: - quantity = SpecificFuelConsumption.From(value, specificFuelConsumptionUnit); - return true; - case SpecificVolumeUnit specificVolumeUnit: - quantity = SpecificVolume.From(value, specificVolumeUnit); - return true; - case SpecificWeightUnit specificWeightUnit: - quantity = SpecificWeight.From(value, specificWeightUnit); - return true; - case SpeedUnit speedUnit: - quantity = Speed.From(value, speedUnit); - return true; - case StandardVolumeFlowUnit standardVolumeFlowUnit: - quantity = StandardVolumeFlow.From(value, standardVolumeFlowUnit); - return true; - case TemperatureUnit temperatureUnit: - quantity = Temperature.From(value, temperatureUnit); - return true; - case TemperatureChangeRateUnit temperatureChangeRateUnit: - quantity = TemperatureChangeRate.From(value, temperatureChangeRateUnit); - return true; - case TemperatureDeltaUnit temperatureDeltaUnit: - quantity = TemperatureDelta.From(value, temperatureDeltaUnit); - return true; - case TemperatureGradientUnit temperatureGradientUnit: - quantity = TemperatureGradient.From(value, temperatureGradientUnit); - return true; - case ThermalConductivityUnit thermalConductivityUnit: - quantity = ThermalConductivity.From(value, thermalConductivityUnit); - return true; - case ThermalResistanceUnit thermalResistanceUnit: - quantity = ThermalResistance.From(value, thermalResistanceUnit); - return true; - case TorqueUnit torqueUnit: - quantity = Torque.From(value, torqueUnit); - return true; - case TorquePerLengthUnit torquePerLengthUnit: - quantity = TorquePerLength.From(value, torquePerLengthUnit); - return true; - case TurbidityUnit turbidityUnit: - quantity = Turbidity.From(value, turbidityUnit); - return true; - case VitaminAUnit vitaminAUnit: - quantity = VitaminA.From(value, vitaminAUnit); - return true; - case VolumeUnit volumeUnit: - quantity = Volume.From(value, volumeUnit); - return true; - case VolumeConcentrationUnit volumeConcentrationUnit: - quantity = VolumeConcentration.From(value, volumeConcentrationUnit); - return true; - case VolumeFlowUnit volumeFlowUnit: - quantity = VolumeFlow.From(value, volumeFlowUnit); - return true; - case VolumeFlowPerAreaUnit volumeFlowPerAreaUnit: - quantity = VolumeFlowPerArea.From(value, volumeFlowPerAreaUnit); - return true; - case VolumePerLengthUnit volumePerLengthUnit: - quantity = VolumePerLength.From(value, volumePerLengthUnit); - return true; - case VolumetricHeatCapacityUnit volumetricHeatCapacityUnit: - quantity = VolumetricHeatCapacity.From(value, volumetricHeatCapacityUnit); - return true; - case WarpingMomentOfInertiaUnit warpingMomentOfInertiaUnit: - quantity = WarpingMomentOfInertia.From(value, warpingMomentOfInertiaUnit); - return true; - default: - { - quantity = default(IQuantity); - return false; - } - } + AccelerationUnit accelerationUnit => Acceleration.From(value, accelerationUnit), + AmountOfSubstanceUnit amountOfSubstanceUnit => AmountOfSubstance.From(value, amountOfSubstanceUnit), + AmplitudeRatioUnit amplitudeRatioUnit => AmplitudeRatio.From(value, amplitudeRatioUnit), + AngleUnit angleUnit => Angle.From(value, angleUnit), + ApparentEnergyUnit apparentEnergyUnit => ApparentEnergy.From(value, apparentEnergyUnit), + ApparentPowerUnit apparentPowerUnit => ApparentPower.From(value, apparentPowerUnit), + AreaUnit areaUnit => Area.From(value, areaUnit), + AreaDensityUnit areaDensityUnit => AreaDensity.From(value, areaDensityUnit), + AreaMomentOfInertiaUnit areaMomentOfInertiaUnit => AreaMomentOfInertia.From(value, areaMomentOfInertiaUnit), + BitRateUnit bitRateUnit => BitRate.From(value, bitRateUnit), + BrakeSpecificFuelConsumptionUnit brakeSpecificFuelConsumptionUnit => BrakeSpecificFuelConsumption.From(value, brakeSpecificFuelConsumptionUnit), + CapacitanceUnit capacitanceUnit => Capacitance.From(value, capacitanceUnit), + CoefficientOfThermalExpansionUnit coefficientOfThermalExpansionUnit => CoefficientOfThermalExpansion.From(value, coefficientOfThermalExpansionUnit), + CompressibilityUnit compressibilityUnit => Compressibility.From(value, compressibilityUnit), + DensityUnit densityUnit => Density.From(value, densityUnit), + DurationUnit durationUnit => Duration.From(value, durationUnit), + DynamicViscosityUnit dynamicViscosityUnit => DynamicViscosity.From(value, dynamicViscosityUnit), + ElectricAdmittanceUnit electricAdmittanceUnit => ElectricAdmittance.From(value, electricAdmittanceUnit), + ElectricChargeUnit electricChargeUnit => ElectricCharge.From(value, electricChargeUnit), + ElectricChargeDensityUnit electricChargeDensityUnit => ElectricChargeDensity.From(value, electricChargeDensityUnit), + ElectricConductanceUnit electricConductanceUnit => ElectricConductance.From(value, electricConductanceUnit), + ElectricConductivityUnit electricConductivityUnit => ElectricConductivity.From(value, electricConductivityUnit), + ElectricCurrentUnit electricCurrentUnit => ElectricCurrent.From(value, electricCurrentUnit), + ElectricCurrentDensityUnit electricCurrentDensityUnit => ElectricCurrentDensity.From(value, electricCurrentDensityUnit), + ElectricCurrentGradientUnit electricCurrentGradientUnit => ElectricCurrentGradient.From(value, electricCurrentGradientUnit), + ElectricFieldUnit electricFieldUnit => ElectricField.From(value, electricFieldUnit), + ElectricInductanceUnit electricInductanceUnit => ElectricInductance.From(value, electricInductanceUnit), + ElectricPotentialUnit electricPotentialUnit => ElectricPotential.From(value, electricPotentialUnit), + ElectricPotentialAcUnit electricPotentialAcUnit => ElectricPotentialAc.From(value, electricPotentialAcUnit), + ElectricPotentialChangeRateUnit electricPotentialChangeRateUnit => ElectricPotentialChangeRate.From(value, electricPotentialChangeRateUnit), + ElectricPotentialDcUnit electricPotentialDcUnit => ElectricPotentialDc.From(value, electricPotentialDcUnit), + ElectricResistanceUnit electricResistanceUnit => ElectricResistance.From(value, electricResistanceUnit), + ElectricResistivityUnit electricResistivityUnit => ElectricResistivity.From(value, electricResistivityUnit), + ElectricSurfaceChargeDensityUnit electricSurfaceChargeDensityUnit => ElectricSurfaceChargeDensity.From(value, electricSurfaceChargeDensityUnit), + EnergyUnit energyUnit => Energy.From(value, energyUnit), + EnergyDensityUnit energyDensityUnit => EnergyDensity.From(value, energyDensityUnit), + EntropyUnit entropyUnit => Entropy.From(value, entropyUnit), + ForceUnit forceUnit => Force.From(value, forceUnit), + ForceChangeRateUnit forceChangeRateUnit => ForceChangeRate.From(value, forceChangeRateUnit), + ForcePerLengthUnit forcePerLengthUnit => ForcePerLength.From(value, forcePerLengthUnit), + FrequencyUnit frequencyUnit => Frequency.From(value, frequencyUnit), + FuelEfficiencyUnit fuelEfficiencyUnit => FuelEfficiency.From(value, fuelEfficiencyUnit), + HeatFluxUnit heatFluxUnit => HeatFlux.From(value, heatFluxUnit), + HeatTransferCoefficientUnit heatTransferCoefficientUnit => HeatTransferCoefficient.From(value, heatTransferCoefficientUnit), + IlluminanceUnit illuminanceUnit => Illuminance.From(value, illuminanceUnit), + ImpulseUnit impulseUnit => Impulse.From(value, impulseUnit), + InformationUnit informationUnit => Information.From(value, informationUnit), + IrradianceUnit irradianceUnit => Irradiance.From(value, irradianceUnit), + IrradiationUnit irradiationUnit => Irradiation.From(value, irradiationUnit), + JerkUnit jerkUnit => Jerk.From(value, jerkUnit), + KinematicViscosityUnit kinematicViscosityUnit => KinematicViscosity.From(value, kinematicViscosityUnit), + LeakRateUnit leakRateUnit => LeakRate.From(value, leakRateUnit), + LengthUnit lengthUnit => Length.From(value, lengthUnit), + LevelUnit levelUnit => Level.From(value, levelUnit), + LinearDensityUnit linearDensityUnit => LinearDensity.From(value, linearDensityUnit), + LinearPowerDensityUnit linearPowerDensityUnit => LinearPowerDensity.From(value, linearPowerDensityUnit), + LuminanceUnit luminanceUnit => Luminance.From(value, luminanceUnit), + LuminosityUnit luminosityUnit => Luminosity.From(value, luminosityUnit), + LuminousFluxUnit luminousFluxUnit => LuminousFlux.From(value, luminousFluxUnit), + LuminousIntensityUnit luminousIntensityUnit => LuminousIntensity.From(value, luminousIntensityUnit), + MagneticFieldUnit magneticFieldUnit => MagneticField.From(value, magneticFieldUnit), + MagneticFluxUnit magneticFluxUnit => MagneticFlux.From(value, magneticFluxUnit), + MagnetizationUnit magnetizationUnit => Magnetization.From(value, magnetizationUnit), + MassUnit massUnit => Mass.From(value, massUnit), + MassConcentrationUnit massConcentrationUnit => MassConcentration.From(value, massConcentrationUnit), + MassFlowUnit massFlowUnit => MassFlow.From(value, massFlowUnit), + MassFluxUnit massFluxUnit => MassFlux.From(value, massFluxUnit), + MassFractionUnit massFractionUnit => MassFraction.From(value, massFractionUnit), + MassMomentOfInertiaUnit massMomentOfInertiaUnit => MassMomentOfInertia.From(value, massMomentOfInertiaUnit), + MolarEnergyUnit molarEnergyUnit => MolarEnergy.From(value, molarEnergyUnit), + MolarEntropyUnit molarEntropyUnit => MolarEntropy.From(value, molarEntropyUnit), + MolarFlowUnit molarFlowUnit => MolarFlow.From(value, molarFlowUnit), + MolarityUnit molarityUnit => Molarity.From(value, molarityUnit), + MolarMassUnit molarMassUnit => MolarMass.From(value, molarMassUnit), + PermeabilityUnit permeabilityUnit => Permeability.From(value, permeabilityUnit), + PermittivityUnit permittivityUnit => Permittivity.From(value, permittivityUnit), + PorousMediumPermeabilityUnit porousMediumPermeabilityUnit => PorousMediumPermeability.From(value, porousMediumPermeabilityUnit), + PowerUnit powerUnit => Power.From(value, powerUnit), + PowerDensityUnit powerDensityUnit => PowerDensity.From(value, powerDensityUnit), + PowerRatioUnit powerRatioUnit => PowerRatio.From(value, powerRatioUnit), + PressureUnit pressureUnit => Pressure.From(value, pressureUnit), + PressureChangeRateUnit pressureChangeRateUnit => PressureChangeRate.From(value, pressureChangeRateUnit), + RatioUnit ratioUnit => Ratio.From(value, ratioUnit), + RatioChangeRateUnit ratioChangeRateUnit => RatioChangeRate.From(value, ratioChangeRateUnit), + ReactiveEnergyUnit reactiveEnergyUnit => ReactiveEnergy.From(value, reactiveEnergyUnit), + ReactivePowerUnit reactivePowerUnit => ReactivePower.From(value, reactivePowerUnit), + ReciprocalAreaUnit reciprocalAreaUnit => ReciprocalArea.From(value, reciprocalAreaUnit), + ReciprocalLengthUnit reciprocalLengthUnit => ReciprocalLength.From(value, reciprocalLengthUnit), + RelativeHumidityUnit relativeHumidityUnit => RelativeHumidity.From(value, relativeHumidityUnit), + RotationalAccelerationUnit rotationalAccelerationUnit => RotationalAcceleration.From(value, rotationalAccelerationUnit), + RotationalSpeedUnit rotationalSpeedUnit => RotationalSpeed.From(value, rotationalSpeedUnit), + RotationalStiffnessUnit rotationalStiffnessUnit => RotationalStiffness.From(value, rotationalStiffnessUnit), + RotationalStiffnessPerLengthUnit rotationalStiffnessPerLengthUnit => RotationalStiffnessPerLength.From(value, rotationalStiffnessPerLengthUnit), + ScalarUnit scalarUnit => Scalar.From(value, scalarUnit), + SolidAngleUnit solidAngleUnit => SolidAngle.From(value, solidAngleUnit), + SpecificEnergyUnit specificEnergyUnit => SpecificEnergy.From(value, specificEnergyUnit), + SpecificEntropyUnit specificEntropyUnit => SpecificEntropy.From(value, specificEntropyUnit), + SpecificFuelConsumptionUnit specificFuelConsumptionUnit => SpecificFuelConsumption.From(value, specificFuelConsumptionUnit), + SpecificVolumeUnit specificVolumeUnit => SpecificVolume.From(value, specificVolumeUnit), + SpecificWeightUnit specificWeightUnit => SpecificWeight.From(value, specificWeightUnit), + SpeedUnit speedUnit => Speed.From(value, speedUnit), + StandardVolumeFlowUnit standardVolumeFlowUnit => StandardVolumeFlow.From(value, standardVolumeFlowUnit), + TemperatureUnit temperatureUnit => Temperature.From(value, temperatureUnit), + TemperatureChangeRateUnit temperatureChangeRateUnit => TemperatureChangeRate.From(value, temperatureChangeRateUnit), + TemperatureDeltaUnit temperatureDeltaUnit => TemperatureDelta.From(value, temperatureDeltaUnit), + TemperatureGradientUnit temperatureGradientUnit => TemperatureGradient.From(value, temperatureGradientUnit), + ThermalConductivityUnit thermalConductivityUnit => ThermalConductivity.From(value, thermalConductivityUnit), + ThermalResistanceUnit thermalResistanceUnit => ThermalResistance.From(value, thermalResistanceUnit), + TorqueUnit torqueUnit => Torque.From(value, torqueUnit), + TorquePerLengthUnit torquePerLengthUnit => TorquePerLength.From(value, torquePerLengthUnit), + TurbidityUnit turbidityUnit => Turbidity.From(value, turbidityUnit), + VitaminAUnit vitaminAUnit => VitaminA.From(value, vitaminAUnit), + VolumeUnit volumeUnit => Volume.From(value, volumeUnit), + VolumeConcentrationUnit volumeConcentrationUnit => VolumeConcentration.From(value, volumeConcentrationUnit), + VolumeFlowUnit volumeFlowUnit => VolumeFlow.From(value, volumeFlowUnit), + VolumeFlowPerAreaUnit volumeFlowPerAreaUnit => VolumeFlowPerArea.From(value, volumeFlowPerAreaUnit), + VolumePerLengthUnit volumePerLengthUnit => VolumePerLength.From(value, volumePerLengthUnit), + VolumetricHeatCapacityUnit volumetricHeatCapacityUnit => VolumetricHeatCapacity.From(value, volumetricHeatCapacityUnit), + WarpingMomentOfInertiaUnit warpingMomentOfInertiaUnit => WarpingMomentOfInertia.From(value, warpingMomentOfInertiaUnit), + _ => null + }; + + return quantity is not null; } /// @@ -814,7 +571,7 @@ public static bool TryParse(IFormatProvider? formatProvider, Type quantityType, Type _ when quantityType == typeof(WarpingMomentOfInertia) => parser.TryParse(quantityString, formatProvider, WarpingMomentOfInertia.From, out quantity), _ => false }; - } + } internal static IEnumerable GetQuantityTypes() { diff --git a/UnitsNet/GeneratedCode/Resources/Acceleration.restext b/UnitsNet/GeneratedCode/Resources/Acceleration.restext new file mode 100644 index 0000000000..064bd76836 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Acceleration.restext @@ -0,0 +1,14 @@ +CentimetersPerSecondSquared=cm/s² +DecimetersPerSecondSquared=dm/s² +FeetPerSecondSquared=ft/s² +InchesPerSecondSquared=in/s² +KilometersPerSecondSquared=km/s² +KnotsPerHour=kn/h +KnotsPerMinute=kn/min +KnotsPerSecond=kn/s +MetersPerSecondSquared=m/s² +MicrometersPerSecondSquared=µm/s² +MillimetersPerSecondSquared=mm/s² +MillistandardGravity=mg +NanometersPerSecondSquared=nm/s² +StandardGravity=g diff --git a/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext new file mode 100644 index 0000000000..56c372a2c1 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Acceleration.ru-RU.restext @@ -0,0 +1,14 @@ +CentimetersPerSecondSquared=см/с² +DecimetersPerSecondSquared=дм/с² +FeetPerSecondSquared=фут/с² +InchesPerSecondSquared=дюйм/с² +KilometersPerSecondSquared=км/с² +KnotsPerHour=узел/час +KnotsPerMinute=узел/мин +KnotsPerSecond=узел/с +MetersPerSecondSquared=м/с² +MicrometersPerSecondSquared=мкм/с² +MillimetersPerSecondSquared=мм/с² +MillistandardGravity=мg +NanometersPerSecondSquared=нм/с² +StandardGravity=g diff --git a/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext new file mode 100644 index 0000000000..4023dee429 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/AmountOfSubstance.restext @@ -0,0 +1,15 @@ +Centimoles=cmol +CentipoundMoles=clbmol +Decimoles=dmol +DecipoundMoles=dlbmol +Kilomoles=kmol +KilopoundMoles=klbmol +Megamoles=Mmol +Micromoles=µmol +MicropoundMoles=µlbmol +Millimoles=mmol +MillipoundMoles=mlbmol +Moles=mol +Nanomoles=nmol +NanopoundMoles=nlbmol +PoundMoles=lbmol diff --git a/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext new file mode 100644 index 0000000000..c9d99ad6e8 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/AmplitudeRatio.restext @@ -0,0 +1,4 @@ +DecibelMicrovolts=dBµV +DecibelMillivolts=dBmV +DecibelsUnloaded=dBu +DecibelVolts=dBV diff --git a/UnitsNet/GeneratedCode/Resources/Angle.restext b/UnitsNet/GeneratedCode/Resources/Angle.restext new file mode 100644 index 0000000000..ea36ba2023 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Angle.restext @@ -0,0 +1,16 @@ +Arcminutes=',arcmin,amin,min +Arcseconds=″,arcsec,asec,sec +Centiradians=crad +Deciradians=drad +Degrees=°,deg +Gradians=g +Microdegrees=µ°,µdeg +Microradians=µrad +Millidegrees=m°,mdeg +Milliradians=mrad +Nanodegrees=n°,ndeg +Nanoradians=nrad +NatoMils=mil +Radians=rad +Revolutions=r +Tilt=sin(θ) diff --git a/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext new file mode 100644 index 0000000000..bfbaf9913e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Angle.ru-RU.restext @@ -0,0 +1,12 @@ +Centiradians=срад +Deciradians=драд +Degrees=° +Gradians=g +Microdegrees=мк° +Microradians=мкрад +Millidegrees=м° +Milliradians=мрад +Nanodegrees=н° +Nanoradians=нрад +Radians=рад +Revolutions=r diff --git a/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext new file mode 100644 index 0000000000..8042321934 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ApparentEnergy.restext @@ -0,0 +1,3 @@ +KilovoltampereHours=kVAh +MegavoltampereHours=MVAh +VoltampereHours=VAh diff --git a/UnitsNet/GeneratedCode/Resources/ApparentPower.restext b/UnitsNet/GeneratedCode/Resources/ApparentPower.restext new file mode 100644 index 0000000000..fa9f53f44c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ApparentPower.restext @@ -0,0 +1,6 @@ +Gigavoltamperes=GVA +Kilovoltamperes=kVA +Megavoltamperes=MVA +Microvoltamperes=µVA +Millivoltamperes=mVA +Voltamperes=VA diff --git a/UnitsNet/GeneratedCode/Resources/Area.restext b/UnitsNet/GeneratedCode/Resources/Area.restext new file mode 100644 index 0000000000..4523655fdc --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Area.restext @@ -0,0 +1,14 @@ +Acres=ac +Hectares=ha +SquareCentimeters=cm² +SquareDecimeters=dm² +SquareFeet=ft² +SquareInches=in² +SquareKilometers=km² +SquareMeters=m² +SquareMicrometers=µm² +SquareMiles=mi² +SquareMillimeters=mm² +SquareNauticalMiles=nmi² +SquareYards=yd² +UsSurveySquareFeet=ft² (US) diff --git a/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext new file mode 100644 index 0000000000..f2a1d12a6c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Area.ru-RU.restext @@ -0,0 +1,14 @@ +Acres=акр +Hectares=га +SquareCentimeters=см² +SquareDecimeters=дм² +SquareFeet=фут² +SquareInches=дюйм² +SquareKilometers=км² +SquareMeters=м² +SquareMicrometers=мкм² +SquareMiles=миля² +SquareMillimeters=мм² +SquareNauticalMiles=морск.миля² +SquareYards=ярд² +UsSurveySquareFeet=фут² (US) diff --git a/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext new file mode 100644 index 0000000000..75b1e89228 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Area.zh-CN.restext @@ -0,0 +1,13 @@ +Acres=英亩 +Hectares=英亩 +SquareCentimeters=平方厘米 +SquareDecimeters=平方分米 +SquareFeet=平方英尺 +SquareInches=平方英寸 +SquareKilometers=平方公里 +SquareMeters=平方米 +SquareMicrometers=平方微米 +SquareMiles=平方英里 +SquareMillimeters=平方毫米 +SquareNauticalMiles=平方海里 +SquareYards=平方码 diff --git a/UnitsNet/GeneratedCode/Resources/AreaDensity.restext b/UnitsNet/GeneratedCode/Resources/AreaDensity.restext new file mode 100644 index 0000000000..6a33618aa9 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/AreaDensity.restext @@ -0,0 +1,3 @@ +GramsPerSquareMeter=g/m²,gsm +KilogramsPerSquareMeter=kg/m² +MilligramsPerSquareMeter=mg/m² diff --git a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext new file mode 100644 index 0000000000..5c66899ab8 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext @@ -0,0 +1,6 @@ +CentimetersToTheFourth=cm⁴,cm^4 +DecimetersToTheFourth=dm⁴,dm^4 +FeetToTheFourth=ft⁴,ft^4 +InchesToTheFourth=in⁴,in^4 +MetersToTheFourth=m⁴,m^4 +MillimetersToTheFourth=mm⁴,mm^4 diff --git a/UnitsNet/GeneratedCode/Resources/BitRate.restext b/UnitsNet/GeneratedCode/Resources/BitRate.restext new file mode 100644 index 0000000000..c88dd8c809 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/BitRate.restext @@ -0,0 +1,26 @@ +BitsPerSecond=bit/s,bps +BytesPerSecond=B/s +ExabitsPerSecond=Ebit/s,Ebps +ExabytesPerSecond=EB/s +ExbibitsPerSecond=Eibit/s,Eibps +ExbibytesPerSecond=EiB/s +GibibitsPerSecond=Gibit/s,Gibps +GibibytesPerSecond=GiB/s +GigabitsPerSecond=Gbit/s,Gbps +GigabytesPerSecond=GB/s +KibibitsPerSecond=Kibit/s,Kibps +KibibytesPerSecond=KiB/s +KilobitsPerSecond=kbit/s,kbps +KilobytesPerSecond=kB/s +MebibitsPerSecond=Mibit/s,Mibps +MebibytesPerSecond=MiB/s +MegabitsPerSecond=Mbit/s,Mbps +MegabytesPerSecond=MB/s +PebibitsPerSecond=Pibit/s,Pibps +PebibytesPerSecond=PiB/s +PetabitsPerSecond=Pbit/s,Pbps +PetabytesPerSecond=PB/s +TebibitsPerSecond=Tibit/s,Tibps +TebibytesPerSecond=TiB/s +TerabitsPerSecond=Tbit/s,Tbps +TerabytesPerSecond=TB/s diff --git a/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext new file mode 100644 index 0000000000..1e1d41fcef --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/BrakeSpecificFuelConsumption.restext @@ -0,0 +1,3 @@ +GramsPerKiloWattHour=g/kWh +KilogramsPerJoule=kg/J +PoundsPerMechanicalHorsepowerHour=lb/hph diff --git a/UnitsNet/GeneratedCode/Resources/Capacitance.restext b/UnitsNet/GeneratedCode/Resources/Capacitance.restext new file mode 100644 index 0000000000..dff2eb0e40 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Capacitance.restext @@ -0,0 +1,7 @@ +Farads=F +Kilofarads=kF +Megafarads=MF +Microfarads=µF +Millifarads=mF +Nanofarads=nF +Picofarads=pF diff --git a/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext b/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext new file mode 100644 index 0000000000..fb188c8ab0 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/CoefficientOfThermalExpansion.restext @@ -0,0 +1,3 @@ +InverseDegreeCelsius=°C⁻¹,1/°C +InverseDegreeFahrenheit=°F⁻¹,1/°F +InverseKelvin=K⁻¹,1/K diff --git a/UnitsNet/GeneratedCode/Resources/Compressibility.restext b/UnitsNet/GeneratedCode/Resources/Compressibility.restext new file mode 100644 index 0000000000..28c11e2b14 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Compressibility.restext @@ -0,0 +1,7 @@ +InverseAtmospheres=atm⁻¹,1/atm +InverseBars=bar⁻¹,1/bar +InverseKilopascals=kPa⁻¹,1/kPa +InverseMegapascals=MPa⁻¹,1/MPa +InverseMillibars=mbar⁻¹,1/mbar +InversePascals=Pa⁻¹,1/Pa +InversePoundsForcePerSquareInch=psi⁻¹,1/psi diff --git a/UnitsNet/GeneratedCode/Resources/Density.restext b/UnitsNet/GeneratedCode/Resources/Density.restext new file mode 100644 index 0000000000..d2a222cc08 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Density.restext @@ -0,0 +1,51 @@ +CentigramsPerDeciLiter=cg/dl +CentigramsPerLiter=cg/L +CentigramsPerMilliliter=cg/ml +DecigramsPerDeciLiter=dg/dl +DecigramsPerLiter=dg/L +DecigramsPerMilliliter=dg/ml +GramsPerCubicCentimeter=g/cm³ +GramsPerCubicFoot=g/ft³ +GramsPerCubicInch=g/in³ +GramsPerCubicMeter=g/m³ +GramsPerCubicMillimeter=g/mm³ +GramsPerDeciLiter=g/dl +GramsPerLiter=g/L +GramsPerMilliliter=g/ml +KilogramsPerCubicCentimeter=kg/cm³ +KilogramsPerCubicMeter=kg/m³ +KilogramsPerCubicMillimeter=kg/mm³ +KilogramsPerLiter=kg/l +KilopoundsPerCubicFoot=kip/ft³ +KilopoundsPerCubicInch=kip/in³ +MicrogramsPerCubicMeter=µg/m³ +MicrogramsPerDeciLiter=µg/dl +MicrogramsPerLiter=µg/L +MicrogramsPerMilliliter=µg/ml +MilligramsPerCubicMeter=mg/m³ +MilligramsPerDeciLiter=mg/dl +MilligramsPerLiter=mg/L +MilligramsPerMilliliter=mg/ml +NanogramsPerDeciLiter=ng/dl +NanogramsPerLiter=ng/L +NanogramsPerMilliliter=ng/ml +PicogramsPerDeciLiter=pg/dl +PicogramsPerLiter=pg/L +PicogramsPerMilliliter=pg/ml +PoundsPerCubicCentimeter=lb/cm³ +PoundsPerCubicFoot=lb/ft³ +PoundsPerCubicInch=lb/in³ +PoundsPerCubicMeter=lb/m³ +PoundsPerCubicMillimeter=lb/mm³ +PoundsPerImperialGallon=ppg (imp.) +PoundsPerUSGallon=ppg (U.S.) +SlugsPerCubicCentimeter=slug/cm³ +SlugsPerCubicFoot=slug/ft³ +SlugsPerCubicInch=slug/in³ +SlugsPerCubicMeter=slug/m³ +SlugsPerCubicMillimeter=slug/mm³ +TonnesPerCubicCentimeter=t/cm³ +TonnesPerCubicFoot=t/ft³ +TonnesPerCubicInch=t/in³ +TonnesPerCubicMeter=t/m³ +TonnesPerCubicMillimeter=t/mm³ diff --git a/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext new file mode 100644 index 0000000000..cf9e285a11 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Density.ru-RU.restext @@ -0,0 +1,4 @@ +GramsPerCubicMeter=г/м³ +KilogramsPerCubicMeter=кг/м³ +MicrogramsPerCubicMeter=мкг/м³ +MilligramsPerCubicMeter=мг/м³ diff --git a/UnitsNet/GeneratedCode/Resources/Duration.restext b/UnitsNet/GeneratedCode/Resources/Duration.restext new file mode 100644 index 0000000000..c19e7a317e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Duration.restext @@ -0,0 +1,11 @@ +Days=d,day,days +Hours=h,hr,hrs,hour,hours +JulianYears=jyr,jyear,jyears +Microseconds=µs,µsec,µsecs,µsecond,µseconds +Milliseconds=ms,msec,msecs,msecond,mseconds +Minutes=m,min,minute,minutes +Months30=mo,month,months +Nanoseconds=ns,nsec,nsecs,nsecond,nseconds +Seconds=s,sec,secs,second,seconds +Weeks=wk,week,weeks +Years365=yr,year,years diff --git a/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext new file mode 100644 index 0000000000..ed11b09eba --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Duration.ru-RU.restext @@ -0,0 +1,10 @@ +Days=сут,д +Hours=ч,час +Microseconds=мксек,мкс +Milliseconds=мсек,мс +Minutes=мин +Months30=месяц +Nanoseconds=нсек,нс +Seconds=сек,с +Weeks=нед +Years365=год diff --git a/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext new file mode 100644 index 0000000000..b3f1ca08f3 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/DynamicViscosity.restext @@ -0,0 +1,10 @@ +Centipoise=cP +MicropascalSeconds=µPa·s,µPaS +MillipascalSeconds=mPa·s,mPaS +NewtonSecondsPerMeterSquared=Ns/m² +PascalSeconds=Pa·s,PaS +Poise=P +PoundsForceSecondPerSquareFoot=lbf·s/ft² +PoundsForceSecondPerSquareInch=lbf·s/in² +PoundsPerFootSecond=lb/ft·s +Reyns=reyn diff --git a/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext b/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext new file mode 100644 index 0000000000..052a7782bf --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricAdmittance.restext @@ -0,0 +1,4 @@ +Microsiemens=µS +Millisiemens=mS +Nanosiemens=nS +Siemens=S diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext b/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext new file mode 100644 index 0000000000..35a944cdf5 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricCharge.restext @@ -0,0 +1,11 @@ +AmpereHours=A-h,Ah +Coulombs=C +KiloampereHours=kA-h,kAh +Kilocoulombs=kC +MegaampereHours=MA-h,MAh +Megacoulombs=MC +Microcoulombs=µC +MilliampereHours=mA-h,mAh +Millicoulombs=mC +Nanocoulombs=nC +Picocoulombs=pC diff --git a/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext new file mode 100644 index 0000000000..58bfdcecbf --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricChargeDensity.restext @@ -0,0 +1 @@ +CoulombsPerCubicMeter=C/m³ diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext new file mode 100644 index 0000000000..72b72d444e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricConductance.restext @@ -0,0 +1,5 @@ +Kilosiemens=kS +Microsiemens=µS +Millisiemens=mS +Nanosiemens=nS +Siemens=S diff --git a/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext b/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext new file mode 100644 index 0000000000..e86928b7c4 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricConductivity.restext @@ -0,0 +1,6 @@ +MicrosiemensPerCentimeter=µS/cm +MillisiemensPerCentimeter=mS/cm +SiemensPerCentimeter=S/cm +SiemensPerFoot=S/ft +SiemensPerInch=S/in +SiemensPerMeter=S/m diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext new file mode 100644 index 0000000000..20ffbec406 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrent.restext @@ -0,0 +1,9 @@ +Amperes=A +Centiamperes=cA +Femtoamperes=fA +Kiloamperes=kA +Megaamperes=MA +Microamperes=µA +Milliamperes=mA +Nanoamperes=nA +Picoamperes=pA diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext new file mode 100644 index 0000000000..5bd15cfde2 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrentDensity.restext @@ -0,0 +1,3 @@ +AmperesPerSquareFoot=A/ft² +AmperesPerSquareInch=A/in² +AmperesPerSquareMeter=A/m² diff --git a/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext new file mode 100644 index 0000000000..4a4fb09d25 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricCurrentGradient.restext @@ -0,0 +1,4 @@ +AmperesPerMicrosecond=A/μs +AmperesPerMillisecond=A/ms +AmperesPerNanosecond=A/ns +AmperesPerSecond=A/s diff --git a/UnitsNet/GeneratedCode/Resources/ElectricField.restext b/UnitsNet/GeneratedCode/Resources/ElectricField.restext new file mode 100644 index 0000000000..f9b731f326 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricField.restext @@ -0,0 +1 @@ +VoltsPerMeter=V/m diff --git a/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext b/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext new file mode 100644 index 0000000000..b09917f74c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricInductance.restext @@ -0,0 +1,5 @@ +Henries=H +Microhenries=µH +Millihenries=mH +Nanohenries=nH +Picohenries=pH diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext new file mode 100644 index 0000000000..35b7f58afc --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotential.restext @@ -0,0 +1,6 @@ +Kilovolts=kV +Megavolts=MV +Microvolts=µV +Millivolts=mV +Nanovolts=nV +Volts=V diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext new file mode 100644 index 0000000000..fd594210ed --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotential.ru-RU.restext @@ -0,0 +1,6 @@ +Kilovolts=кВ +Megavolts=МВ +Microvolts=мкВ +Millivolts=мВ +Nanovolts=нВ +Volts=В diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext new file mode 100644 index 0000000000..e2c2b53e63 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialAc.restext @@ -0,0 +1,5 @@ +KilovoltsAc=kVac +MegavoltsAc=MVac +MicrovoltsAc=µVac +MillivoltsAc=mVac +VoltsAc=Vac diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext new file mode 100644 index 0000000000..23e9c0726c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialChangeRate.restext @@ -0,0 +1,20 @@ +KilovoltsPerHours=kV/h +KilovoltsPerMicroseconds=kV/μs +KilovoltsPerMinutes=kV/min +KilovoltsPerSeconds=kV/s +MegavoltsPerHours=MV/h +MegavoltsPerMicroseconds=MV/μs +MegavoltsPerMinutes=MV/min +MegavoltsPerSeconds=MV/s +MicrovoltsPerHours=µV/h +MicrovoltsPerMicroseconds=µV/μs +MicrovoltsPerMinutes=µV/min +MicrovoltsPerSeconds=µV/s +MillivoltsPerHours=mV/h +MillivoltsPerMicroseconds=mV/μs +MillivoltsPerMinutes=mV/min +MillivoltsPerSeconds=mV/s +VoltsPerHours=V/h +VoltsPerMicroseconds=V/μs +VoltsPerMinutes=V/min +VoltsPerSeconds=V/s diff --git a/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext new file mode 100644 index 0000000000..621ba8ba48 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricPotentialDc.restext @@ -0,0 +1,5 @@ +KilovoltsDc=kVdc +MegavoltsDc=MVdc +MicrovoltsDc=µVdc +MillivoltsDc=mVdc +VoltsDc=Vdc diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext new file mode 100644 index 0000000000..b49c0108bf --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricResistance.restext @@ -0,0 +1,7 @@ +Gigaohms=GΩ +Kiloohms=kΩ +Megaohms=MΩ +Microohms=µΩ +Milliohms=mΩ +Ohms=Ω +Teraohms=TΩ diff --git a/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext new file mode 100644 index 0000000000..52428a4c2f --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricResistivity.restext @@ -0,0 +1,14 @@ +KiloohmsCentimeter=kΩ·cm +KiloohmMeters=kΩ·m +MegaohmsCentimeter=MΩ·cm +MegaohmMeters=MΩ·m +MicroohmsCentimeter=µΩ·cm +MicroohmMeters=µΩ·m +MilliohmsCentimeter=mΩ·cm +MilliohmMeters=mΩ·m +NanoohmsCentimeter=nΩ·cm +NanoohmMeters=nΩ·m +OhmsCentimeter=Ω·cm +OhmMeters=Ω·m +PicoohmsCentimeter=pΩ·cm +PicoohmMeters=pΩ·m diff --git a/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext new file mode 100644 index 0000000000..9ea26b76b4 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ElectricSurfaceChargeDensity.restext @@ -0,0 +1,3 @@ +CoulombsPerSquareCentimeter=C/cm² +CoulombsPerSquareInch=C/in² +CoulombsPerSquareMeter=C/m² diff --git a/UnitsNet/GeneratedCode/Resources/Energy.restext b/UnitsNet/GeneratedCode/Resources/Energy.restext new file mode 100644 index 0000000000..3b92b18e90 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Energy.restext @@ -0,0 +1,38 @@ +BritishThermalUnits=BTU +Calories=cal +DecathermsEc=Dth (E.C.) +DecathermsImperial=Dth (imp.) +DecathermsUs=Dth (U.S.) +ElectronVolts=eV +Ergs=erg +FootPounds=ft·lb +GigabritishThermalUnits=GBTU +GigaelectronVolts=GeV +Gigajoules=GJ +GigawattDays=GWd +GigawattHours=GWh +HorsepowerHours=hp·h +Joules=J +KilobritishThermalUnits=kBTU +Kilocalories=kcal +KiloelectronVolts=keV +Kilojoules=kJ +KilowattDays=kWd +KilowattHours=kWh +MegabritishThermalUnits=MBTU +Megacalories=Mcal +MegaelectronVolts=MeV +Megajoules=MJ +MegawattDays=MWd +MegawattHours=MWh +Millijoules=mJ +Petajoules=PJ +TeraelectronVolts=TeV +Terajoules=TJ +TerawattDays=TWd +TerawattHours=TWh +ThermsEc=th (E.C.) +ThermsImperial=th (imp.) +ThermsUs=th (U.S.) +WattDays=Wd +WattHours=Wh diff --git a/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext new file mode 100644 index 0000000000..8a387337d3 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Energy.ru-RU.restext @@ -0,0 +1,21 @@ +DecathermsEc=Европейский декатерм +DecathermsImperial=Английский декатерм +DecathermsUs=Американский декатерм +ElectronVolts=эВ +GigaelectronVolts=ГэВ +GigawattDays=ГВт/д +GigawattHours=ГВт/ч +KiloelectronVolts=кэВ +KilowattDays=кВт/д +KilowattHours=кВт/ч +MegaelectronVolts=МэВ +MegawattDays=МВт/д +MegawattHours=МВт/ч +TeraelectronVolts=ТэВ +TerawattDays=ТВт/д +TerawattHours=ТВт/ч +ThermsEc=Европейский терм +ThermsImperial=Английский терм +ThermsUs=Американский терм +WattDays=Вт/д +WattHours=Вт/ч diff --git a/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext b/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext new file mode 100644 index 0000000000..5cd1a0f883 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/EnergyDensity.restext @@ -0,0 +1,12 @@ +GigajoulesPerCubicMeter=GJ/m³ +GigawattHoursPerCubicMeter=GWh/m³ +JoulesPerCubicMeter=J/m³ +KilojoulesPerCubicMeter=kJ/m³ +KilowattHoursPerCubicMeter=kWh/m³ +MegajoulesPerCubicMeter=MJ/m³ +MegawattHoursPerCubicMeter=MWh/m³ +PetajoulesPerCubicMeter=PJ/m³ +PetawattHoursPerCubicMeter=PWh/m³ +TerajoulesPerCubicMeter=TJ/m³ +TerawattHoursPerCubicMeter=TWh/m³ +WattHoursPerCubicMeter=Wh/m³ diff --git a/UnitsNet/GeneratedCode/Resources/Entropy.restext b/UnitsNet/GeneratedCode/Resources/Entropy.restext new file mode 100644 index 0000000000..91eb829c9b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Entropy.restext @@ -0,0 +1,7 @@ +CaloriesPerKelvin=cal/K +JoulesPerDegreeCelsius=J/C +JoulesPerKelvin=J/K +KilocaloriesPerKelvin=kcal/K +KilojoulesPerDegreeCelsius=kJ/C +KilojoulesPerKelvin=kJ/K +MegajoulesPerKelvin=MJ/K diff --git a/UnitsNet/GeneratedCode/Resources/Force.restext b/UnitsNet/GeneratedCode/Resources/Force.restext new file mode 100644 index 0000000000..b848f036c4 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Force.restext @@ -0,0 +1,15 @@ +Decanewtons=daN +Dyne=dyn +KilogramsForce=kgf +Kilonewtons=kN +KiloPonds=kp +KilopoundsForce=kipf,kip,k +Meganewtons=MN +Micronewtons=µN +Millinewtons=mN +Newtons=N +OunceForce=ozf +Poundals=pdl +PoundsForce=lbf +ShortTonsForce=tf (short),t (US)f,short tons-force +TonnesForce=tf,Ton diff --git a/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext new file mode 100644 index 0000000000..4133ca9268 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Force.ru-RU.restext @@ -0,0 +1,13 @@ +Decanewtons=даН +Dyne=дин +KilogramsForce=кгс +Kilonewtons=кН +KiloPonds=кгс +KilopoundsForce=кипф,койка,К +Meganewtons=МН +Micronewtons=мкН +Millinewtons=мН +Newtons=Н +Poundals=паундаль +PoundsForce=фунт-сила +TonnesForce=тс diff --git a/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext new file mode 100644 index 0000000000..ca6827bf94 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ForceChangeRate.restext @@ -0,0 +1,15 @@ +CentinewtonsPerSecond=cN/s +DecanewtonsPerMinute=daN/min +DecanewtonsPerSecond=daN/s +DecinewtonsPerSecond=dN/s +KilonewtonsPerMinute=kN/min +KilonewtonsPerSecond=kN/s +KilopoundsForcePerMinute=kipf/min,kip/min,k/min +KilopoundsForcePerSecond=kipf/s,kip/s,k/s +MicronewtonsPerSecond=µN/s +MillinewtonsPerSecond=mN/s +NanonewtonsPerSecond=nN/s +NewtonsPerMinute=N/min +NewtonsPerSecond=N/s +PoundsForcePerMinute=lbf/min +PoundsForcePerSecond=lbf/s diff --git a/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext b/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext new file mode 100644 index 0000000000..17ad4f3f7d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ForcePerLength.restext @@ -0,0 +1,38 @@ +CentinewtonsPerCentimeter=cN/cm +CentinewtonsPerMeter=cN/m +CentinewtonsPerMillimeter=cN/mm +DecanewtonsPerCentimeter=daN/cm +DecanewtonsPerMeter=daN/m +DecanewtonsPerMillimeter=daN/mm +DecinewtonsPerCentimeter=dN/cm +DecinewtonsPerMeter=dN/m +DecinewtonsPerMillimeter=dN/mm +KilogramsForcePerCentimeter=kgf/cm +KilogramsForcePerMeter=kgf/m +KilogramsForcePerMillimeter=kgf/mm +KilonewtonsPerCentimeter=kN/cm +KilonewtonsPerMeter=kN/m +KilonewtonsPerMillimeter=kN/mm +KilopoundsForcePerFoot=kipf/ft,kip/ft,k/ft +KilopoundsForcePerInch=kipf/in,kip/in,k/in +MeganewtonsPerCentimeter=MN/cm +MeganewtonsPerMeter=MN/m +MeganewtonsPerMillimeter=MN/mm +MicronewtonsPerCentimeter=µN/cm +MicronewtonsPerMeter=µN/m +MicronewtonsPerMillimeter=µN/mm +MillinewtonsPerCentimeter=mN/cm +MillinewtonsPerMeter=mN/m +MillinewtonsPerMillimeter=mN/mm +NanonewtonsPerCentimeter=nN/cm +NanonewtonsPerMeter=nN/m +NanonewtonsPerMillimeter=nN/mm +NewtonsPerCentimeter=N/cm +NewtonsPerMeter=N/m +NewtonsPerMillimeter=N/mm +PoundsForcePerFoot=lbf/ft +PoundsForcePerInch=lbf/in +PoundsForcePerYard=lbf/yd +TonnesForcePerCentimeter=tf/cm +TonnesForcePerMeter=tf/m +TonnesForcePerMillimeter=tf/mm diff --git a/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext new file mode 100644 index 0000000000..53df4915e5 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ForcePerLength.ru-RU.restext @@ -0,0 +1,6 @@ +KilogramsForcePerCentimeter=кгс/см +KilogramsForcePerMeter=кгс/м +KilogramsForcePerMillimeter=кгс/мм +TonnesForcePerCentimeter=тс/см +TonnesForcePerMeter=тс/м +TonnesForcePerMillimeter=тс/мм diff --git a/UnitsNet/GeneratedCode/Resources/Frequency.restext b/UnitsNet/GeneratedCode/Resources/Frequency.restext new file mode 100644 index 0000000000..1eae761bd8 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Frequency.restext @@ -0,0 +1,13 @@ +BeatsPerMinute=bpm +BUnits=B Units +CyclesPerHour=cph +CyclesPerMinute=cpm +Gigahertz=GHz +Hertz=Hz +Kilohertz=kHz +Megahertz=MHz +Microhertz=µHz +Millihertz=mHz +PerSecond=s⁻¹ +RadiansPerSecond=rad/s +Terahertz=THz diff --git a/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext new file mode 100644 index 0000000000..aeec1b65e3 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Frequency.ru-RU.restext @@ -0,0 +1,9 @@ +Gigahertz=ГГц +Hertz=Гц +Kilohertz=кГц +Megahertz=МГц +Microhertz=мкГц +Millihertz=мГц +PerSecond=с⁻¹ +RadiansPerSecond=рад/с +Terahertz=ТГц diff --git a/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext new file mode 100644 index 0000000000..600f577506 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/FuelEfficiency.restext @@ -0,0 +1,4 @@ +KilometersPerLiters=km/L +LitersPer100Kilometers=L/100km +MilesPerUkGallon=mpg (imp.) +MilesPerUsGallon=mpg (U.S.) diff --git a/UnitsNet/GeneratedCode/Resources/HeatFlux.restext b/UnitsNet/GeneratedCode/Resources/HeatFlux.restext new file mode 100644 index 0000000000..fa33c6d644 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/HeatFlux.restext @@ -0,0 +1,18 @@ +BtusPerHourSquareFoot=BTU/h·ft² +BtusPerMinuteSquareFoot=BTU/min·ft² +BtusPerSecondSquareFoot=BTU/s·ft² +BtusPerSecondSquareInch=BTU/s·in² +CaloriesPerSecondSquareCentimeter=cal/s·cm² +CentiwattsPerSquareMeter=cW/m² +DeciwattsPerSquareMeter=dW/m² +KilocaloriesPerHourSquareMeter=kcal/h·m² +KilocaloriesPerSecondSquareCentimeter=kcal/s·cm² +KilowattsPerSquareMeter=kW/m² +MicrowattsPerSquareMeter=µW/m² +MilliwattsPerSquareMeter=mW/m² +NanowattsPerSquareMeter=nW/m² +PoundsForcePerFootSecond=lbf/(ft·s) +PoundsPerSecondCubed=lb/s³,lbm/s³ +WattsPerSquareFoot=W/ft² +WattsPerSquareInch=W/in² +WattsPerSquareMeter=W/m² diff --git a/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext new file mode 100644 index 0000000000..86874b6f2f --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/HeatTransferCoefficient.restext @@ -0,0 +1,6 @@ +BtusPerHourSquareFootDegreeFahrenheit=Btu/h·ft²·°F,Btu/ft²·h·°F,Btu/hr·ft²·°F,Btu/ft²·hr·°F +BtusPerSquareFootDegreeFahrenheit=Btu/ft²·°F +CaloriesPerHourSquareMeterDegreeCelsius=kcal/h·m²·°C,kcal/m²·h·°C,kcal/hr·m²·°C,kcal/m²·hr·°C +KilocaloriesPerHourSquareMeterDegreeCelsius=kkcal/h·m²·°C,kkcal/m²·h·°C,kkcal/hr·m²·°C,kkcal/m²·hr·°C +WattsPerSquareMeterCelsius=W/m²·°C +WattsPerSquareMeterKelvin=W/m²·K diff --git a/UnitsNet/GeneratedCode/Resources/Illuminance.restext b/UnitsNet/GeneratedCode/Resources/Illuminance.restext new file mode 100644 index 0000000000..7be0e145b5 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Illuminance.restext @@ -0,0 +1,4 @@ +Kilolux=klx +Lux=lx +Megalux=Mlx +Millilux=mlx diff --git a/UnitsNet/GeneratedCode/Resources/Impulse.restext b/UnitsNet/GeneratedCode/Resources/Impulse.restext new file mode 100644 index 0000000000..ac016e9dce --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Impulse.restext @@ -0,0 +1,13 @@ +CentinewtonSeconds=cN·s +DecanewtonSeconds=daN·s +DecinewtonSeconds=dN·s +KilogramMetersPerSecond=kg·m/s +KilonewtonSeconds=kN·s +MeganewtonSeconds=MN·s +MicronewtonSeconds=µN·s +MillinewtonSeconds=mN·s +NanonewtonSeconds=nN·s +NewtonSeconds=N·s +PoundFeetPerSecond=lb·ft/s +PoundForceSeconds=lbf·s +SlugFeetPerSecond=slug·ft/s diff --git a/UnitsNet/GeneratedCode/Resources/Information.restext b/UnitsNet/GeneratedCode/Resources/Information.restext new file mode 100644 index 0000000000..7618b95362 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Information.restext @@ -0,0 +1,26 @@ +Bits=b +Bytes=B +Exabits=Eb +Exabytes=EB +Exbibits=Eib +Exbibytes=EiB +Gibibits=Gib +Gibibytes=GiB +Gigabits=Gb +Gigabytes=GB +Kibibits=Kib +Kibibytes=KiB +Kilobits=kb +Kilobytes=kB +Mebibits=Mib +Mebibytes=MiB +Megabits=Mb +Megabytes=MB +Pebibits=Pib +Pebibytes=PiB +Petabits=Pb +Petabytes=PB +Tebibits=Tib +Tebibytes=TiB +Terabits=Tb +Terabytes=TB diff --git a/UnitsNet/GeneratedCode/Resources/Irradiance.restext b/UnitsNet/GeneratedCode/Resources/Irradiance.restext new file mode 100644 index 0000000000..c4295cfff7 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Irradiance.restext @@ -0,0 +1,14 @@ +KilowattsPerSquareCentimeter=kW/cm² +KilowattsPerSquareMeter=kW/m² +MegawattsPerSquareCentimeter=MW/cm² +MegawattsPerSquareMeter=MW/m² +MicrowattsPerSquareCentimeter=µW/cm² +MicrowattsPerSquareMeter=µW/m² +MilliwattsPerSquareCentimeter=mW/cm² +MilliwattsPerSquareMeter=mW/m² +NanowattsPerSquareCentimeter=nW/cm² +NanowattsPerSquareMeter=nW/m² +PicowattsPerSquareCentimeter=pW/cm² +PicowattsPerSquareMeter=pW/m² +WattsPerSquareCentimeter=W/cm² +WattsPerSquareMeter=W/m² diff --git a/UnitsNet/GeneratedCode/Resources/Irradiation.restext b/UnitsNet/GeneratedCode/Resources/Irradiation.restext new file mode 100644 index 0000000000..b2a605bb57 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Irradiation.restext @@ -0,0 +1,7 @@ +JoulesPerSquareCentimeter=J/cm² +JoulesPerSquareMeter=J/m² +JoulesPerSquareMillimeter=J/mm² +KilojoulesPerSquareMeter=kJ/m² +KilowattHoursPerSquareMeter=kWh/m² +MillijoulesPerSquareCentimeter=mJ/cm² +WattHoursPerSquareMeter=Wh/m² diff --git a/UnitsNet/GeneratedCode/Resources/Jerk.restext b/UnitsNet/GeneratedCode/Resources/Jerk.restext new file mode 100644 index 0000000000..97127725dd --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Jerk.restext @@ -0,0 +1,11 @@ +CentimetersPerSecondCubed=cm/s³ +DecimetersPerSecondCubed=dm/s³ +FeetPerSecondCubed=ft/s³ +InchesPerSecondCubed=in/s³ +KilometersPerSecondCubed=km/s³ +MetersPerSecondCubed=m/s³ +MicrometersPerSecondCubed=µm/s³ +MillimetersPerSecondCubed=mm/s³ +MillistandardGravitiesPerSecond=mg/s +NanometersPerSecondCubed=nm/s³ +StandardGravitiesPerSecond=g/s diff --git a/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext new file mode 100644 index 0000000000..348f076150 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Jerk.ru-RU.restext @@ -0,0 +1,11 @@ +CentimetersPerSecondCubed=см/с³ +DecimetersPerSecondCubed=дм/с³ +FeetPerSecondCubed=фут/с³ +InchesPerSecondCubed=дюйм/с³ +KilometersPerSecondCubed=км/с³ +MetersPerSecondCubed=м/с³ +MicrometersPerSecondCubed=мкм/с³ +MillimetersPerSecondCubed=мм/с³ +MillistandardGravitiesPerSecond=мg/s +NanometersPerSecondCubed=нм/с³ +StandardGravitiesPerSecond=g/s diff --git a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext new file mode 100644 index 0000000000..3aaa4e0502 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.restext @@ -0,0 +1,9 @@ +Centistokes=cSt +Decistokes=dSt +Kilostokes=kSt +Microstokes=µSt +Millistokes=mSt +Nanostokes=nSt +SquareFeetPerSecond=ft²/s +SquareMetersPerSecond=m²/s +Stokes=St diff --git a/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext new file mode 100644 index 0000000000..de3a168f1f --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/KinematicViscosity.ru-RU.restext @@ -0,0 +1,8 @@ +Centistokes=сСт +Decistokes=дСт +Kilostokes=кСт +Microstokes=мкСт +Millistokes=мСт +Nanostokes=нСт +SquareMetersPerSecond=м²/с +Stokes=Ст diff --git a/UnitsNet/GeneratedCode/Resources/LeakRate.restext b/UnitsNet/GeneratedCode/Resources/LeakRate.restext new file mode 100644 index 0000000000..168e4fa2f0 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/LeakRate.restext @@ -0,0 +1,3 @@ +MillibarLitersPerSecond=mbar·l/s +PascalCubicMetersPerSecond=Pa·m³/s +TorrLitersPerSecond=Torr·l/s diff --git a/UnitsNet/GeneratedCode/Resources/Length.restext b/UnitsNet/GeneratedCode/Resources/Length.restext new file mode 100644 index 0000000000..5c8b747523 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Length.restext @@ -0,0 +1,37 @@ +Angstroms=Å,A +AstronomicalUnits=au,ua +Centimeters=cm +Chains=ch +DataMiles=DM +Decameters=dam +Decimeters=dm +DtpPicas=pica +DtpPoints=pt +Fathoms=fathom +Feet=ft,',′ +Hands=h,hh +Hectometers=hm +Inches=in,\",″ +KilolightYears=kly +Kilometers=km +Kiloparsecs=kpc +LightYears=ly +MegalightYears=Mly +Megameters=Mm +Megaparsecs=Mpc +Meters=m +Microinches=µin +Micrometers=µm +Mils=mil +Miles=mi +Millimeters=mm +Nanometers=nm +NauticalMiles=NM +Parsecs=pc +PrinterPicas=pica +PrinterPoints=pt +Shackles=shackle +SolarRadiuses=R⊙ +Twips=twip +UsSurveyFeet=ftUS +Yards=yd diff --git a/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext new file mode 100644 index 0000000000..836367c136 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Length.ru-RU.restext @@ -0,0 +1,17 @@ +Centimeters=см +Decameters=дам +Decimeters=дм +Feet=фут +Hectometers=гм +Inches=дюйм +Kilometers=км +Megameters=Мм +Meters=м +Microinches=микродюйм +Micrometers=мкм +Mils=мил +Miles=миля +Millimeters=мм +Nanometers=нм +NauticalMiles=мил +Yards=ярд diff --git a/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext new file mode 100644 index 0000000000..e1588e58af --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Length.zh-CN.restext @@ -0,0 +1,17 @@ +Centimeters=厘米 +Decameters=十米 +Decimeters=分米 +Feet=英尺 +Hectometers=百米 +Inches=英寸 +Kilometers=千米 +Megameters=兆米 +Meters=米 +Microinches=微英寸 +Micrometers=微米 +Mils=密耳 +Miles=英里 +Millimeters=毫米 +Nanometers=纳米 +NauticalMiles=纳米 +Yards=码 diff --git a/UnitsNet/GeneratedCode/Resources/Level.restext b/UnitsNet/GeneratedCode/Resources/Level.restext new file mode 100644 index 0000000000..ae4f5c46b9 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Level.restext @@ -0,0 +1,2 @@ +Decibels=dB +Nepers=Np diff --git a/UnitsNet/GeneratedCode/Resources/LinearDensity.restext b/UnitsNet/GeneratedCode/Resources/LinearDensity.restext new file mode 100644 index 0000000000..dde0536f92 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/LinearDensity.restext @@ -0,0 +1,14 @@ +GramsPerCentimeter=g/cm +GramsPerMeter=g/m +GramsPerMillimeter=g/mm +KilogramsPerCentimeter=kg/cm +KilogramsPerMeter=kg/m +KilogramsPerMillimeter=kg/mm +MicrogramsPerCentimeter=µg/cm +MicrogramsPerMeter=µg/m +MicrogramsPerMillimeter=µg/mm +MilligramsPerCentimeter=mg/cm +MilligramsPerMeter=mg/m +MilligramsPerMillimeter=mg/mm +PoundsPerFoot=lb/ft +PoundsPerInch=lb/in diff --git a/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext new file mode 100644 index 0000000000..20afc46669 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/LinearPowerDensity.restext @@ -0,0 +1,25 @@ +GigawattsPerCentimeter=GW/cm +GigawattsPerFoot=GW/ft +GigawattsPerInch=GW/in +GigawattsPerMeter=GW/m +GigawattsPerMillimeter=GW/mm +KilowattsPerCentimeter=kW/cm +KilowattsPerFoot=kW/ft +KilowattsPerInch=kW/in +KilowattsPerMeter=kW/m +KilowattsPerMillimeter=kW/mm +MegawattsPerCentimeter=MW/cm +MegawattsPerFoot=MW/ft +MegawattsPerInch=MW/in +MegawattsPerMeter=MW/m +MegawattsPerMillimeter=MW/mm +MilliwattsPerCentimeter=mW/cm +MilliwattsPerFoot=mW/ft +MilliwattsPerInch=mW/in +MilliwattsPerMeter=mW/m +MilliwattsPerMillimeter=mW/mm +WattsPerCentimeter=W/cm +WattsPerFoot=W/ft +WattsPerInch=W/in +WattsPerMeter=W/m +WattsPerMillimeter=W/mm diff --git a/UnitsNet/GeneratedCode/Resources/Luminance.restext b/UnitsNet/GeneratedCode/Resources/Luminance.restext new file mode 100644 index 0000000000..4ff2a3183e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Luminance.restext @@ -0,0 +1,10 @@ +CandelasPerSquareFoot=Cd/ft² +CandelasPerSquareInch=Cd/in² +CandelasPerSquareMeter=Cd/m² +CenticandelasPerSquareMeter=cCd/m² +DecicandelasPerSquareMeter=dCd/m² +KilocandelasPerSquareMeter=kCd/m² +MicrocandelasPerSquareMeter=µCd/m² +MillicandelasPerSquareMeter=mCd/m² +NanocandelasPerSquareMeter=nCd/m² +Nits=nt diff --git a/UnitsNet/GeneratedCode/Resources/Luminosity.restext b/UnitsNet/GeneratedCode/Resources/Luminosity.restext new file mode 100644 index 0000000000..a538eac196 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Luminosity.restext @@ -0,0 +1,14 @@ +Decawatts=daW +Deciwatts=dW +Femtowatts=fW +Gigawatts=GW +Kilowatts=kW +Megawatts=MW +Microwatts=µW +Milliwatts=mW +Nanowatts=nW +Petawatts=PW +Picowatts=pW +SolarLuminosities=L⊙ +Terawatts=TW +Watts=W diff --git a/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext b/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext new file mode 100644 index 0000000000..1b80e4d994 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/LuminousFlux.restext @@ -0,0 +1 @@ +Lumens=lm diff --git a/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext b/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext new file mode 100644 index 0000000000..0a24cbf0b1 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/LuminousIntensity.restext @@ -0,0 +1 @@ +Candela=cd diff --git a/UnitsNet/GeneratedCode/Resources/MagneticField.restext b/UnitsNet/GeneratedCode/Resources/MagneticField.restext new file mode 100644 index 0000000000..7dc507ba62 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MagneticField.restext @@ -0,0 +1,6 @@ +Gausses=G +Microteslas=µT +Milligausses=mG +Milliteslas=mT +Nanoteslas=nT +Teslas=T diff --git a/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext b/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext new file mode 100644 index 0000000000..a0ff58d09b --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MagneticFlux.restext @@ -0,0 +1 @@ +Webers=Wb diff --git a/UnitsNet/GeneratedCode/Resources/Magnetization.restext b/UnitsNet/GeneratedCode/Resources/Magnetization.restext new file mode 100644 index 0000000000..3551e5ae9e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Magnetization.restext @@ -0,0 +1 @@ +AmperesPerMeter=A/m diff --git a/UnitsNet/GeneratedCode/Resources/Mass.restext b/UnitsNet/GeneratedCode/Resources/Mass.restext new file mode 100644 index 0000000000..e5e2f75215 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Mass.restext @@ -0,0 +1,27 @@ +Centigrams=cg +Decagrams=dag +Decigrams=dg +EarthMasses=em +Femtograms=fg +Grains=gr +Grams=g +Hectograms=hg +Kilograms=kg +Kilopounds=klb,klbs,klbm +Kilotonnes=kt +LongHundredweight=cwt +LongTons=long tn +Megapounds=Mlb,Mlbs,Mlbm +Megatonnes=Mt +Micrograms=µg +Milligrams=mg +Nanograms=ng +Ounces=oz +Picograms=pg +Pounds=lb,lbs,lbm +ShortHundredweight=cwt +ShortTons=t (short),short tn,ST +Slugs=slug +SolarMasses=M☉,M⊙ +Stone=st +Tonnes=t diff --git a/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext new file mode 100644 index 0000000000..c8caf23378 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Mass.ru-RU.restext @@ -0,0 +1,19 @@ +Centigrams=сг +Decagrams=даг +Decigrams=дг +Femtograms=фг +Grams=г +Hectograms=гг +Kilograms=кг +Kilopounds=кфунт +Kilotonnes=кт +LongTons=тонна большая +Megapounds=Мфунт +Megatonnes=Мт +Micrograms=мкг +Milligrams=мг +Nanograms=нг +Picograms=пг +Pounds=фунт +ShortTons=тонна малая +Tonnes=т diff --git a/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext b/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext new file mode 100644 index 0000000000..3433770b35 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Mass.zh-CN.restext @@ -0,0 +1,20 @@ +Centigrams=厘克 +Decagrams=十克 +Decigrams=分克 +Femtograms=飞克 +Grams=克 +Hectograms=百克 +Kilograms=千克 +Kilopounds=千磅 +Kilotonnes=千吨 +LongTons=长吨 +Megapounds=兆磅 +Megatonnes=兆吨 +Micrograms=微克 +Milligrams=毫克 +Nanograms=纳克 +Ounces=盎司 +Picograms=皮克 +Pounds=磅 +ShortTons=短吨 +Tonnes=吨 diff --git a/UnitsNet/GeneratedCode/Resources/MassConcentration.restext b/UnitsNet/GeneratedCode/Resources/MassConcentration.restext new file mode 100644 index 0000000000..bad8eb5e1d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassConcentration.restext @@ -0,0 +1,49 @@ +CentigramsPerDeciliter=cg/dL +CentigramsPerLiter=cg/L +CentigramsPerMicroliter=cg/μL +CentigramsPerMilliliter=cg/mL +DecigramsPerDeciliter=dg/dL +DecigramsPerLiter=dg/L +DecigramsPerMicroliter=dg/μL +DecigramsPerMilliliter=dg/mL +GramsPerCubicCentimeter=g/cm³ +GramsPerCubicMeter=g/m³ +GramsPerCubicMillimeter=g/mm³ +GramsPerDeciliter=g/dL +GramsPerLiter=g/L +GramsPerMicroliter=g/μL +GramsPerMilliliter=g/mL +KilogramsPerCubicCentimeter=kg/cm³ +KilogramsPerCubicMeter=kg/m³ +KilogramsPerCubicMillimeter=kg/mm³ +KilogramsPerLiter=kg/L +KilopoundsPerCubicFoot=kip/ft³ +KilopoundsPerCubicInch=kip/in³ +MicrogramsPerCubicMeter=µg/m³ +MicrogramsPerDeciliter=µg/dL +MicrogramsPerLiter=µg/L +MicrogramsPerMicroliter=µg/μL +MicrogramsPerMilliliter=µg/mL +MilligramsPerCubicMeter=mg/m³ +MilligramsPerDeciliter=mg/dL +MilligramsPerLiter=mg/L +MilligramsPerMicroliter=mg/μL +MilligramsPerMilliliter=mg/mL +NanogramsPerDeciliter=ng/dL +NanogramsPerLiter=ng/L +NanogramsPerMicroliter=ng/μL +NanogramsPerMilliliter=ng/mL +OuncesPerImperialGallon=oz/gal (imp.) +OuncesPerUSGallon=oz/gal (U.S.) +PicogramsPerDeciliter=pg/dL +PicogramsPerLiter=pg/L +PicogramsPerMicroliter=pg/μL +PicogramsPerMilliliter=pg/mL +PoundsPerCubicFoot=lb/ft³ +PoundsPerCubicInch=lb/in³ +PoundsPerImperialGallon=ppg (imp.) +PoundsPerUSGallon=ppg (U.S.) +SlugsPerCubicFoot=slug/ft³ +TonnesPerCubicCentimeter=t/cm³ +TonnesPerCubicMeter=t/m³ +TonnesPerCubicMillimeter=t/mm³ diff --git a/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext new file mode 100644 index 0000000000..cf9e285a11 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassConcentration.ru-RU.restext @@ -0,0 +1,4 @@ +GramsPerCubicMeter=г/м³ +KilogramsPerCubicMeter=кг/м³ +MicrogramsPerCubicMeter=мкг/м³ +MilligramsPerCubicMeter=мг/м³ diff --git a/UnitsNet/GeneratedCode/Resources/MassFlow.restext b/UnitsNet/GeneratedCode/Resources/MassFlow.restext new file mode 100644 index 0000000000..73ed7b0a44 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassFlow.restext @@ -0,0 +1,33 @@ +CentigramsPerDay=cg/d +CentigramsPerSecond=cg/s,cg/S +DecagramsPerDay=dag/d +DecagramsPerSecond=dag/s,dag/S +DecigramsPerDay=dg/d +DecigramsPerSecond=dg/s,dg/S +GramsPerDay=g/d +GramsPerHour=g/h +GramsPerSecond=g/s,g/S +HectogramsPerDay=hg/d +HectogramsPerSecond=hg/s,hg/S +KilogramsPerDay=kg/d +KilogramsPerHour=kg/h +KilogramsPerMinute=kg/min +KilogramsPerSecond=kg/s,kg/S +MegagramsPerDay=Mg/d +MegapoundsPerDay=Mlb/d +MegapoundsPerHour=Mlb/h +MegapoundsPerMinute=Mlb/min +MegapoundsPerSecond=Mlb/s +MicrogramsPerDay=µg/d +MicrogramsPerSecond=µg/s,µg/S +MilligramsPerDay=mg/d +MilligramsPerSecond=mg/s,mg/S +NanogramsPerDay=ng/d +NanogramsPerSecond=ng/s,ng/S +PoundsPerDay=lb/d +PoundsPerHour=lb/h +PoundsPerMinute=lb/min +PoundsPerSecond=lb/s +ShortTonsPerHour=short tn/h +TonnesPerDay=t/d +TonnesPerHour=t/h diff --git a/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext new file mode 100644 index 0000000000..ffc8827f39 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassFlow.ru-RU.restext @@ -0,0 +1,2 @@ +KilogramsPerHour=кг/ч +KilogramsPerMinute=кг/мин diff --git a/UnitsNet/GeneratedCode/Resources/MassFlux.restext b/UnitsNet/GeneratedCode/Resources/MassFlux.restext new file mode 100644 index 0000000000..4f66814fa4 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassFlux.restext @@ -0,0 +1,12 @@ +GramsPerHourPerSquareCentimeter=g·h⁻¹·cm⁻² +GramsPerHourPerSquareMeter=g·h⁻¹·m⁻² +GramsPerHourPerSquareMillimeter=g·h⁻¹·mm⁻² +GramsPerSecondPerSquareCentimeter=g·s⁻¹·cm⁻² +GramsPerSecondPerSquareMeter=g·s⁻¹·m⁻² +GramsPerSecondPerSquareMillimeter=g·s⁻¹·mm⁻² +KilogramsPerHourPerSquareCentimeter=kg·h⁻¹·cm⁻² +KilogramsPerHourPerSquareMeter=kg·h⁻¹·m⁻² +KilogramsPerHourPerSquareMillimeter=kg·h⁻¹·mm⁻² +KilogramsPerSecondPerSquareCentimeter=kg·s⁻¹·cm⁻² +KilogramsPerSecondPerSquareMeter=kg·s⁻¹·m⁻² +KilogramsPerSecondPerSquareMillimeter=kg·s⁻¹·mm⁻² diff --git a/UnitsNet/GeneratedCode/Resources/MassFraction.restext b/UnitsNet/GeneratedCode/Resources/MassFraction.restext new file mode 100644 index 0000000000..dc3f4590a1 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassFraction.restext @@ -0,0 +1,24 @@ +CentigramsPerGram=cg/g +CentigramsPerKilogram=cg/kg +DecagramsPerGram=dag/g +DecagramsPerKilogram=dag/kg +DecigramsPerGram=dg/g +DecigramsPerKilogram=dg/kg +DecimalFractions= +GramsPerGram=g/g +GramsPerKilogram=g/kg +HectogramsPerGram=hg/g +HectogramsPerKilogram=hg/kg +KilogramsPerGram=kg/g +KilogramsPerKilogram=kg/kg +MicrogramsPerGram=µg/g +MicrogramsPerKilogram=µg/kg +MilligramsPerGram=mg/g +MilligramsPerKilogram=mg/kg +NanogramsPerGram=ng/g +NanogramsPerKilogram=ng/kg +PartsPerBillion=ppb +PartsPerMillion=ppm +PartsPerThousand=‰ +PartsPerTrillion=ppt +Percent=%,% (w/w) diff --git a/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext new file mode 100644 index 0000000000..bfe8e0bae8 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MassMomentOfInertia.restext @@ -0,0 +1,28 @@ +GramSquareCentimeters=g·cm² +GramSquareDecimeters=g·dm² +GramSquareMeters=g·m² +GramSquareMillimeters=g·mm² +KilogramSquareCentimeters=kg·cm² +KilogramSquareDecimeters=kg·dm² +KilogramSquareMeters=kg·m² +KilogramSquareMillimeters=kg·mm² +KilotonneSquareCentimeters=kt·cm² +KilotonneSquareDecimeters=kt·dm² +KilotonneSquareMeters=kt·m² +KilotonneSquareMilimeters=kt·mm² +MegatonneSquareCentimeters=Mt·cm² +MegatonneSquareDecimeters=Mt·dm² +MegatonneSquareMeters=Mt·m² +MegatonneSquareMilimeters=Mt·mm² +MilligramSquareCentimeters=mg·cm² +MilligramSquareDecimeters=mg·dm² +MilligramSquareMeters=mg·m² +MilligramSquareMillimeters=mg·mm² +PoundSquareFeet=lb·ft² +PoundSquareInches=lb·in² +SlugSquareFeet=slug·ft² +SlugSquareInches=slug·in² +TonneSquareCentimeters=t·cm² +TonneSquareDecimeters=t·dm² +TonneSquareMeters=t·m² +TonneSquareMilimeters=t·mm² diff --git a/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext b/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext new file mode 100644 index 0000000000..1d5160a9af --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MolarEnergy.restext @@ -0,0 +1,3 @@ +JoulesPerMole=J/mol +KilojoulesPerMole=kJ/mol +MegajoulesPerMole=MJ/mol diff --git a/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext new file mode 100644 index 0000000000..8c521b457c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext @@ -0,0 +1,3 @@ +JoulesPerMoleKelvin=J/(mol*K) +KilojoulesPerMoleKelvin=kJ/(mol*K) +MegajoulesPerMoleKelvin=MJ/(mol*K) diff --git a/UnitsNet/GeneratedCode/Resources/MolarFlow.restext b/UnitsNet/GeneratedCode/Resources/MolarFlow.restext new file mode 100644 index 0000000000..ebbc452809 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MolarFlow.restext @@ -0,0 +1,9 @@ +KilomolesPerHour=kkmol/h +KilomolesPerMinute=kmol/min +KilomolesPerSecond=kmol/s +MolesPerHour=kmol/h +MolesPerMinute=mol/min +MolesPerSecond=mol/s +PoundMolesPerHour=lbmol/h +PoundMolesPerMinute=lbmol/min +PoundMolesPerSecond=lbmol/s diff --git a/UnitsNet/GeneratedCode/Resources/MolarMass.restext b/UnitsNet/GeneratedCode/Resources/MolarMass.restext new file mode 100644 index 0000000000..94dcf8c7c5 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MolarMass.restext @@ -0,0 +1,13 @@ +CentigramsPerMole=cg/mol +DecagramsPerMole=dag/mol +DecigramsPerMole=dg/mol +GramsPerMole=g/mol +HectogramsPerMole=hg/mol +KilogramsPerKilomole=kg/kmol +KilogramsPerMole=kg/mol +KilopoundsPerMole=klb/mol +MegapoundsPerMole=Mlb/mol +MicrogramsPerMole=µg/mol +MilligramsPerMole=mg/mol +NanogramsPerMole=ng/mol +PoundsPerMole=lb/mol diff --git a/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext new file mode 100644 index 0000000000..978f3a81e6 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/MolarMass.ru-RU.restext @@ -0,0 +1,12 @@ +CentigramsPerMole=сг/моль +DecagramsPerMole=даг/моль +DecigramsPerMole=дг/моль +GramsPerMole=г/моль +HectogramsPerMole=гг/моль +KilogramsPerMole=кг/моль +KilopoundsPerMole=кфунт/моль +MegapoundsPerMole=Мфунт/моль +MicrogramsPerMole=мкг/моль +MilligramsPerMole=мг/моль +NanogramsPerMole=нг/моль +PoundsPerMole=фунт/моль diff --git a/UnitsNet/GeneratedCode/Resources/Molarity.restext b/UnitsNet/GeneratedCode/Resources/Molarity.restext new file mode 100644 index 0000000000..5778892f07 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Molarity.restext @@ -0,0 +1,11 @@ +CentimolesPerLiter=cmol/L,cM +DecimolesPerLiter=dmol/L,dM +FemtomolesPerLiter=fmol/L,fM +KilomolesPerCubicMeter=kmol/m³ +MicromolesPerLiter=µmol/L,µM +MillimolesPerLiter=mmol/L,mM +MolesPerCubicMeter=mol/m³ +MolesPerLiter=mol/L,M +NanomolesPerLiter=nmol/L,nM +PicomolesPerLiter=pmol/L,pM +PoundMolesPerCubicFoot=lbmol/ft³ diff --git a/UnitsNet/GeneratedCode/Resources/Permeability.restext b/UnitsNet/GeneratedCode/Resources/Permeability.restext new file mode 100644 index 0000000000..286ef6a3f1 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Permeability.restext @@ -0,0 +1 @@ +HenriesPerMeter=H/m diff --git a/UnitsNet/GeneratedCode/Resources/Permittivity.restext b/UnitsNet/GeneratedCode/Resources/Permittivity.restext new file mode 100644 index 0000000000..b7096d1f8a --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Permittivity.restext @@ -0,0 +1 @@ +FaradsPerMeter=F/m diff --git a/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext new file mode 100644 index 0000000000..6e3648f252 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/PorousMediumPermeability.restext @@ -0,0 +1,5 @@ +Darcys=D +Microdarcys=µD +Millidarcys=mD +SquareCentimeters=cm² +SquareMeters=m² diff --git a/UnitsNet/GeneratedCode/Resources/Power.restext b/UnitsNet/GeneratedCode/Resources/Power.restext new file mode 100644 index 0000000000..cb46946705 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Power.restext @@ -0,0 +1,26 @@ +BoilerHorsepower=hp(S) +BritishThermalUnitsPerHour=Btu/h,Btu/hr +Decawatts=daW +Deciwatts=dW +ElectricalHorsepower=hp(E) +Femtowatts=fW +GigajoulesPerHour=GJ/h +Gigawatts=GW +HydraulicHorsepower=hp(H) +JoulesPerHour=J/h +KilobritishThermalUnitsPerHour=kBtu/h,kBtu/hr +KilojoulesPerHour=kJ/h +Kilowatts=kW +MechanicalHorsepower=hp(I) +MegabritishThermalUnitsPerHour=MBtu/h,MBtu/hr +MegajoulesPerHour=MJ/h +Megawatts=MW +MetricHorsepower=hp(M) +Microwatts=µW +MillijoulesPerHour=mJ/h +Milliwatts=mW +Nanowatts=nW +Petawatts=PW +Picowatts=pW +Terawatts=TW +Watts=W diff --git a/UnitsNet/GeneratedCode/Resources/PowerDensity.restext b/UnitsNet/GeneratedCode/Resources/PowerDensity.restext new file mode 100644 index 0000000000..a0684fe787 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/PowerDensity.restext @@ -0,0 +1,44 @@ +DecawattsPerCubicFoot=daW/ft³ +DecawattsPerCubicInch=daW/in³ +DecawattsPerCubicMeter=daW/m³ +DecawattsPerLiter=daW/l +DeciwattsPerCubicFoot=dW/ft³ +DeciwattsPerCubicInch=dW/in³ +DeciwattsPerCubicMeter=dW/m³ +DeciwattsPerLiter=dW/l +GigawattsPerCubicFoot=GW/ft³ +GigawattsPerCubicInch=GW/in³ +GigawattsPerCubicMeter=GW/m³ +GigawattsPerLiter=GW/l +KilowattsPerCubicFoot=kW/ft³ +KilowattsPerCubicInch=kW/in³ +KilowattsPerCubicMeter=kW/m³ +KilowattsPerLiter=kW/l +MegawattsPerCubicFoot=MW/ft³ +MegawattsPerCubicInch=MW/in³ +MegawattsPerCubicMeter=MW/m³ +MegawattsPerLiter=MW/l +MicrowattsPerCubicFoot=µW/ft³ +MicrowattsPerCubicInch=µW/in³ +MicrowattsPerCubicMeter=µW/m³ +MicrowattsPerLiter=µW/l +MilliwattsPerCubicFoot=mW/ft³ +MilliwattsPerCubicInch=mW/in³ +MilliwattsPerCubicMeter=mW/m³ +MilliwattsPerLiter=mW/l +NanowattsPerCubicFoot=nW/ft³ +NanowattsPerCubicInch=nW/in³ +NanowattsPerCubicMeter=nW/m³ +NanowattsPerLiter=nW/l +PicowattsPerCubicFoot=pW/ft³ +PicowattsPerCubicInch=pW/in³ +PicowattsPerCubicMeter=pW/m³ +PicowattsPerLiter=pW/l +TerawattsPerCubicFoot=TW/ft³ +TerawattsPerCubicInch=TW/in³ +TerawattsPerCubicMeter=TW/m³ +TerawattsPerLiter=TW/l +WattsPerCubicFoot=W/ft³ +WattsPerCubicInch=W/in³ +WattsPerCubicMeter=W/m³ +WattsPerLiter=W/l diff --git a/UnitsNet/GeneratedCode/Resources/PowerRatio.restext b/UnitsNet/GeneratedCode/Resources/PowerRatio.restext new file mode 100644 index 0000000000..bee494e892 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/PowerRatio.restext @@ -0,0 +1,2 @@ +DecibelMilliwatts=dBmW,dBm +DecibelWatts=dBW diff --git a/UnitsNet/GeneratedCode/Resources/Pressure.restext b/UnitsNet/GeneratedCode/Resources/Pressure.restext new file mode 100644 index 0000000000..584104d6cc --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Pressure.restext @@ -0,0 +1,49 @@ +Atmospheres=atm +Bars=bar +Centibars=cbar +CentimetersOfWaterColumn=cmH₂O,cmH2O,cm wc,cm wg +Decapascals=daPa +Decibars=dbar +DynesPerSquareCentimeter=dyn/cm² +FeetOfElevation=ft of elevation +FeetOfHead=ft of head +Gigapascals=GPa +Hectopascals=hPa +InchesOfMercury=inHg +InchesOfWaterColumn=inH2O,inch wc,wc +Kilobars=kbar +KilogramsForcePerSquareCentimeter=kgf/cm² +KilogramsForcePerSquareMeter=kgf/m² +KilogramsForcePerSquareMillimeter=kgf/mm² +KilonewtonsPerSquareCentimeter=kN/cm² +KilonewtonsPerSquareMeter=kN/m² +KilonewtonsPerSquareMillimeter=kN/mm² +Kilopascals=kPa +KilopoundsForcePerSquareFoot=kipf/ft² +KilopoundsForcePerSquareInch=ksi,kipf/in² +KilopoundsForcePerSquareMil=kipf/mil² +Megabars=Mbar +MeganewtonsPerSquareMeter=MN/m² +Megapascals=MPa +MetersOfElevation=m of elevation +MetersOfHead=m of head +MetersOfWaterColumn=mH₂O,mH2O,m wc,m wg +Microbars=µbar +Micropascals=µPa +Millibars=mbar +MillimetersOfMercury=mmHg +MillimetersOfWaterColumn=mmH₂O,mmH2O,mm wc,mm wg +Millipascals=mPa +NewtonsPerSquareCentimeter=N/cm² +NewtonsPerSquareMeter=N/m² +NewtonsPerSquareMillimeter=N/mm² +Pascals=Pa +PoundsForcePerSquareFoot=lb/ft² +PoundsForcePerSquareInch=psi,lb/in² +PoundsForcePerSquareMil=lb/mil²,lbs/mil² +PoundsPerInchSecondSquared=lbm/(in·s²),lb/(in·s²) +TechnicalAtmospheres=at +TonnesForcePerSquareCentimeter=tf/cm² +TonnesForcePerSquareMeter=tf/m² +TonnesForcePerSquareMillimeter=tf/mm² +Torrs=torr diff --git a/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext new file mode 100644 index 0000000000..7e4a13564c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Pressure.ru-RU.restext @@ -0,0 +1,31 @@ +Atmospheres=атм +Bars=бар +Centibars=сбар +Decapascals=даПа +Decibars=дбар +Gigapascals=ГПа +Hectopascals=гПа +Kilobars=кбар +KilogramsForcePerSquareCentimeter=кгс/см² +KilogramsForcePerSquareMeter=кгс/м² +KilogramsForcePerSquareMillimeter=кгс/мм² +KilonewtonsPerSquareCentimeter=кН/см² +KilonewtonsPerSquareMeter=кН/м² +KilonewtonsPerSquareMillimeter=кН/мм² +Kilopascals=кПа +KilopoundsForcePerSquareInch=ksi,kipf/in² +Megabars=Мбар +MeganewtonsPerSquareMeter=МН/м² +Megapascals=МПа +Microbars=мкбар +Micropascals=мкПа +Millibars=мбар +MillimetersOfMercury=мм рт.ст. +Millipascals=мПа +NewtonsPerSquareCentimeter=Н/см² +NewtonsPerSquareMeter=Н/м² +NewtonsPerSquareMillimeter=Н/мм² +Pascals=Па +PoundsForcePerSquareInch=psi,lb/in² +TechnicalAtmospheres=ат +Torrs=торр diff --git a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext new file mode 100644 index 0000000000..04f57bca0e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.restext @@ -0,0 +1,14 @@ +AtmospheresPerSecond=atm/s +KilopascalsPerMinute=kPa/min +KilopascalsPerSecond=kPa/s +KilopoundsForcePerSquareInchPerMinute=ksi/min,kipf/in²/min +KilopoundsForcePerSquareInchPerSecond=ksi/s,kipf/in²/s +MegapascalsPerMinute=MPa/min +MegapascalsPerSecond=MPa/s +MegapoundsForcePerSquareInchPerMinute=Mpsi/min,Mlb/in²/min +MegapoundsForcePerSquareInchPerSecond=Mpsi/s,Mlb/in²/s +MillimetersOfMercuryPerSecond=mmHg/s +PascalsPerMinute=Pa/min +PascalsPerSecond=Pa/s +PoundsForcePerSquareInchPerMinute=psi/min,lb/in²/min +PoundsForcePerSquareInchPerSecond=psi/s,lb/in²/s diff --git a/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext new file mode 100644 index 0000000000..096bd255b2 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/PressureChangeRate.ru-RU.restext @@ -0,0 +1,14 @@ +AtmospheresPerSecond=атм/с +KilopascalsPerMinute=кПа/мин +KilopascalsPerSecond=кПа/с +KilopoundsForcePerSquareInchPerMinute=ksi/мин,kipf/in²/мин +KilopoundsForcePerSquareInchPerSecond=ksi/с,kipf/in²/с +MegapascalsPerMinute=МПа/мин +MegapascalsPerSecond=МПа/с +MegapoundsForcePerSquareInchPerMinute=Мpsi/мин,Мlb/in²/мин +MegapoundsForcePerSquareInchPerSecond=Мpsi/с,Мlb/in²/с +MillimetersOfMercuryPerSecond=mmHg/с +PascalsPerMinute=Па/мин +PascalsPerSecond=Па/с +PoundsForcePerSquareInchPerMinute=psi/мин,lb/in²/мин +PoundsForcePerSquareInchPerSecond=psi/с,lb/in²/с diff --git a/UnitsNet/GeneratedCode/Resources/Ratio.restext b/UnitsNet/GeneratedCode/Resources/Ratio.restext new file mode 100644 index 0000000000..f9a93cd8ac --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Ratio.restext @@ -0,0 +1,6 @@ +DecimalFractions= +PartsPerBillion=ppb +PartsPerMillion=ppm +PartsPerThousand=‰ +PartsPerTrillion=ppt +Percent=% diff --git a/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext new file mode 100644 index 0000000000..d45887b598 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RatioChangeRate.restext @@ -0,0 +1,2 @@ +DecimalFractionsPerSecond=/s +PercentsPerSecond=%/s diff --git a/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext new file mode 100644 index 0000000000..1b5a2f86ac --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ReactiveEnergy.restext @@ -0,0 +1,3 @@ +KilovoltampereReactiveHours=kvarh +MegavoltampereReactiveHours=Mvarh +VoltampereReactiveHours=varh diff --git a/UnitsNet/GeneratedCode/Resources/ReactivePower.restext b/UnitsNet/GeneratedCode/Resources/ReactivePower.restext new file mode 100644 index 0000000000..713ea6becd --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ReactivePower.restext @@ -0,0 +1,4 @@ +GigavoltamperesReactive=Gvar +KilovoltamperesReactive=kvar +MegavoltamperesReactive=Mvar +VoltamperesReactive=var diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext new file mode 100644 index 0000000000..208266794d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ReciprocalArea.restext @@ -0,0 +1,11 @@ +InverseSquareCentimeters=cm⁻² +InverseSquareDecimeters=dm⁻² +InverseSquareFeet=ft⁻² +InverseSquareInches=in⁻² +InverseSquareKilometers=km⁻² +InverseSquareMeters=m⁻² +InverseSquareMicrometers=µm⁻² +InverseSquareMiles=mi⁻² +InverseSquareMillimeters=mm⁻² +InverseSquareYards=yd⁻² +InverseUsSurveySquareFeet=ft⁻² (US) diff --git a/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext new file mode 100644 index 0000000000..b75f051bd4 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ReciprocalLength.restext @@ -0,0 +1,10 @@ +InverseCentimeters=cm⁻¹,1/cm +InverseFeet=ft⁻¹,1/ft +InverseInches=in⁻¹,1/in +InverseMeters=m⁻¹,1/m +InverseMicroinches=µin⁻¹,1/µin +InverseMils=mil⁻¹,1/mil +InverseMiles=mi⁻¹,1/mi +InverseMillimeters=mm⁻¹,1/mm +InverseUsSurveyFeet=ftUS⁻¹,1/ftUS +InverseYards=yd⁻¹,1/yd diff --git a/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext b/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext new file mode 100644 index 0000000000..d77b73c585 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RelativeHumidity.restext @@ -0,0 +1 @@ +Percent=%RH diff --git a/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext new file mode 100644 index 0000000000..bd1e547ee8 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RotationalAcceleration.restext @@ -0,0 +1,4 @@ +DegreesPerSecondSquared=°/s²,deg/s² +RadiansPerSecondSquared=rad/s² +RevolutionsPerMinutePerSecond=rpm/s +RevolutionsPerSecondSquared=r/s² diff --git a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext new file mode 100644 index 0000000000..b74f0eced0 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.restext @@ -0,0 +1,13 @@ +CentiradiansPerSecond=crad/s +DeciradiansPerSecond=drad/s +DegreesPerMinute=°/min,deg/min +DegreesPerSecond=°/s,deg/s +MicrodegreesPerSecond=µ°/s,µdeg/s +MicroradiansPerSecond=µrad/s +MillidegreesPerSecond=m°/s,mdeg/s +MilliradiansPerSecond=mrad/s +NanodegreesPerSecond=n°/s,ndeg/s +NanoradiansPerSecond=nrad/s +RadiansPerSecond=rad/s +RevolutionsPerMinute=rpm,r/min +RevolutionsPerSecond=r/s diff --git a/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext new file mode 100644 index 0000000000..86015ae367 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RotationalSpeed.ru-RU.restext @@ -0,0 +1,12 @@ +CentiradiansPerSecond=срад/с +DeciradiansPerSecond=драд/с +DegreesPerSecond=°/с +MicrodegreesPerSecond=мк°/с +MicroradiansPerSecond=мкрад/с +MillidegreesPerSecond=м°/с +MilliradiansPerSecond=мрад/с +NanodegreesPerSecond=н°/с +NanoradiansPerSecond=нрад/с +RadiansPerSecond=рад/с +RevolutionsPerMinute=об/мин +RevolutionsPerSecond=об/с diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext new file mode 100644 index 0000000000..9eb85a9abf --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RotationalStiffness.restext @@ -0,0 +1,33 @@ +CentinewtonMetersPerDegree=cN·m/deg,cNm/deg,cN·m/°,cNm/° +CentinewtonMillimetersPerDegree=cN·mm/deg,cNmm/deg,cN·mm/°,cNmm/° +CentinewtonMillimetersPerRadian=cN·mm/rad,cNmm/rad +DecanewtonMetersPerDegree=daN·m/deg,daNm/deg,daN·m/°,daNm/° +DecanewtonMillimetersPerDegree=daN·mm/deg,daNmm/deg,daN·mm/°,daNmm/° +DecanewtonMillimetersPerRadian=daN·mm/rad,daNmm/rad +DecinewtonMetersPerDegree=dN·m/deg,dNm/deg,dN·m/°,dNm/° +DecinewtonMillimetersPerDegree=dN·mm/deg,dNmm/deg,dN·mm/°,dNmm/° +DecinewtonMillimetersPerRadian=dN·mm/rad,dNmm/rad +KilonewtonMetersPerDegree=kN·m/deg,kNm/deg,kN·m/°,kNm/° +KilonewtonMetersPerRadian=kN·m/rad,kNm/rad +KilonewtonMillimetersPerDegree=kN·mm/deg,kNmm/deg,kN·mm/°,kNmm/° +KilonewtonMillimetersPerRadian=kN·mm/rad,kNmm/rad +KilopoundForceFeetPerDegrees=kipf·ft/°,kip·ft/°g,k·ft/°,kipf·ft/deg,kip·ft/deg,k·ft/deg +MeganewtonMetersPerDegree=MN·m/deg,MNm/deg,MN·m/°,MNm/° +MeganewtonMetersPerRadian=MN·m/rad,MNm/rad +MeganewtonMillimetersPerDegree=MN·mm/deg,MNmm/deg,MN·mm/°,MNmm/° +MeganewtonMillimetersPerRadian=MN·mm/rad,MNmm/rad +MicronewtonMetersPerDegree=µN·m/deg,µNm/deg,µN·m/°,µNm/° +MicronewtonMillimetersPerDegree=µN·mm/deg,µNmm/deg,µN·mm/°,µNmm/° +MicronewtonMillimetersPerRadian=µN·mm/rad,µNmm/rad +MillinewtonMetersPerDegree=mN·m/deg,mNm/deg,mN·m/°,mNm/° +MillinewtonMillimetersPerDegree=mN·mm/deg,mNmm/deg,mN·mm/°,mNmm/° +MillinewtonMillimetersPerRadian=mN·mm/rad,mNmm/rad +NanonewtonMetersPerDegree=nN·m/deg,nNm/deg,nN·m/°,nNm/° +NanonewtonMillimetersPerDegree=nN·mm/deg,nNmm/deg,nN·mm/°,nNmm/° +NanonewtonMillimetersPerRadian=nN·mm/rad,nNmm/rad +NewtonMetersPerDegree=N·m/deg,Nm/deg,N·m/°,Nm/° +NewtonMetersPerRadian=N·m/rad,Nm/rad +NewtonMillimetersPerDegree=N·mm/deg,Nmm/deg,N·mm/°,Nmm/° +NewtonMillimetersPerRadian=N·mm/rad,Nmm/rad +PoundForceFeetPerRadian=lbf·ft/rad +PoundForceFeetPerDegrees=lbf·ft/deg diff --git a/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext new file mode 100644 index 0000000000..48d7fd59a7 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/RotationalStiffnessPerLength.restext @@ -0,0 +1,5 @@ +KilonewtonMetersPerRadianPerMeter=kN·m/rad/m,kNm/rad/m +KilopoundForceFeetPerDegreesPerFeet=kipf·ft/°/ft,kip·ft/°/ft,k·ft/°/ft,kipf·ft/deg/ft,kip·ft/deg/ft,k·ft/deg/ft +MeganewtonMetersPerRadianPerMeter=MN·m/rad/m,MNm/rad/m +NewtonMetersPerRadianPerMeter=N·m/rad/m,Nm/rad/m +PoundForceFeetPerDegreesPerFeet=lbf·ft/deg/ft diff --git a/UnitsNet/GeneratedCode/Resources/Scalar.restext b/UnitsNet/GeneratedCode/Resources/Scalar.restext new file mode 100644 index 0000000000..8a5376da0d --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Scalar.restext @@ -0,0 +1 @@ +Amount= diff --git a/UnitsNet/GeneratedCode/Resources/SolidAngle.restext b/UnitsNet/GeneratedCode/Resources/SolidAngle.restext new file mode 100644 index 0000000000..d890c7b19e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SolidAngle.restext @@ -0,0 +1 @@ +Steradians=sr diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext new file mode 100644 index 0000000000..23d2275a4f --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SpecificEnergy.restext @@ -0,0 +1,30 @@ +BtuPerPound=btu/lb +CaloriesPerGram=cal/g +GigawattDaysPerKilogram=GWd/kg +GigawattDaysPerShortTon=GWd/ST +GigawattDaysPerTonne=GWd/t +GigawattHoursPerKilogram=GWh/kg +GigawattHoursPerPound=GWh/lbs +JoulesPerKilogram=J/kg +KilocaloriesPerGram=kcal/g +KilojoulesPerKilogram=kJ/kg +KilowattDaysPerKilogram=kWd/kg +KilowattDaysPerShortTon=kWd/ST +KilowattDaysPerTonne=kWd/t +KilowattHoursPerKilogram=kWh/kg +KilowattHoursPerPound=kWh/lbs +MegajoulesPerKilogram=MJ/kg +MegaJoulesPerTonne=MJ/t +MegawattDaysPerKilogram=MWd/kg +MegawattDaysPerShortTon=MWd/ST +MegawattDaysPerTonne=MWd/t +MegawattHoursPerKilogram=MWh/kg +MegawattHoursPerPound=MWh/lbs +TerawattDaysPerKilogram=TWd/kg +TerawattDaysPerShortTon=TWd/ST +TerawattDaysPerTonne=TWd/t +WattDaysPerKilogram=Wd/kg +WattDaysPerShortTon=Wd/ST +WattDaysPerTonne=Wd/t +WattHoursPerKilogram=Wh/kg +WattHoursPerPound=Wh/lbs diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext new file mode 100644 index 0000000000..371a4e2471 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext @@ -0,0 +1,9 @@ +BtusPerPoundFahrenheit=BTU/lb·°F,BTU/lbm·°F +CaloriesPerGramKelvin=cal/g.K +JoulesPerKilogramDegreeCelsius=J/kg.C +JoulesPerKilogramKelvin=J/kg.K +KilocaloriesPerGramKelvin=kcal/g.K +KilojoulesPerKilogramDegreeCelsius=kJ/kg.C +KilojoulesPerKilogramKelvin=kJ/kg.K +MegajoulesPerKilogramDegreeCelsius=MJ/kg.C +MegajoulesPerKilogramKelvin=MJ/kg.K diff --git a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext new file mode 100644 index 0000000000..89e437194a --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext @@ -0,0 +1,4 @@ +GramsPerKiloNewtonSecond=g/(kN�s) +KilogramsPerKilogramForceHour=kg/(kgf�h) +KilogramsPerKiloNewtonSecond=kg/(kN�s) +PoundsMassPerPoundForceHour=lb/(lbf·h) diff --git a/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext b/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext new file mode 100644 index 0000000000..c287f002c6 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SpecificVolume.restext @@ -0,0 +1,3 @@ +CubicFeetPerPound=ft³/lb +CubicMetersPerKilogram=m³/kg +MillicubicMetersPerKilogram=mm³/kg diff --git a/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext b/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext new file mode 100644 index 0000000000..3f3df54cb5 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/SpecificWeight.restext @@ -0,0 +1,17 @@ +KilogramsForcePerCubicCentimeter=kgf/cm³ +KilogramsForcePerCubicMeter=kgf/m³ +KilogramsForcePerCubicMillimeter=kgf/mm³ +KilonewtonsPerCubicCentimeter=kN/cm³ +KilonewtonsPerCubicMeter=kN/m³ +KilonewtonsPerCubicMillimeter=kN/mm³ +KilopoundsForcePerCubicFoot=kipf/ft³ +KilopoundsForcePerCubicInch=kipf/in³ +MeganewtonsPerCubicMeter=MN/m³ +NewtonsPerCubicCentimeter=N/cm³ +NewtonsPerCubicMeter=N/m³ +NewtonsPerCubicMillimeter=N/mm³ +PoundsForcePerCubicFoot=lbf/ft³ +PoundsForcePerCubicInch=lbf/in³ +TonnesForcePerCubicCentimeter=tf/cm³ +TonnesForcePerCubicMeter=tf/m³ +TonnesForcePerCubicMillimeter=tf/mm³ diff --git a/UnitsNet/GeneratedCode/Resources/Speed.restext b/UnitsNet/GeneratedCode/Resources/Speed.restext new file mode 100644 index 0000000000..c98cc42920 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Speed.restext @@ -0,0 +1,33 @@ +CentimetersPerHour=cm/h +CentimetersPerMinutes=cm/min +CentimetersPerSecond=cm/s +DecimetersPerMinutes=dm/min +DecimetersPerSecond=dm/s +FeetPerHour=ft/h +FeetPerMinute=ft/min +FeetPerSecond=ft/s +InchesPerHour=in/h +InchesPerMinute=in/min +InchesPerSecond=in/s +KilometersPerHour=km/h +KilometersPerMinutes=km/min +KilometersPerSecond=km/s +Knots=kn,kt,knot,knots +Mach=M,Ma,MN,MACH +MetersPerHour=m/h +MetersPerMinutes=m/min +MetersPerSecond=m/s +MicrometersPerMinutes=µm/min +MicrometersPerSecond=µm/s +MilesPerHour=mph +MillimetersPerHour=mm/h +MillimetersPerMinutes=mm/min +MillimetersPerSecond=mm/s +NanometersPerMinutes=nm/min +NanometersPerSecond=nm/s +UsSurveyFeetPerHour=ftUS/h +UsSurveyFeetPerMinute=ftUS/min +UsSurveyFeetPerSecond=ftUS/s +YardsPerHour=yd/h +YardsPerMinute=yd/min +YardsPerSecond=yd/s diff --git a/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext new file mode 100644 index 0000000000..96968602f0 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Speed.ru-RU.restext @@ -0,0 +1,24 @@ +CentimetersPerHour=см/ч +CentimetersPerMinutes=см/мин +CentimetersPerSecond=см/с +DecimetersPerMinutes=дм/мин +DecimetersPerSecond=дм/с +FeetPerHour=фут/ч +FeetPerMinute=фут/мин +FeetPerSecond=фут/с +KilometersPerHour=км/ч +KilometersPerMinutes=км/мин +KilometersPerSecond=км/с +Knots=уз. +Mach=мах +MetersPerHour=м/ч +MetersPerMinutes=м/мин +MetersPerSecond=м/с +MicrometersPerMinutes=мкм/мин +MicrometersPerSecond=мкм/с +MilesPerHour=миль/ч +MillimetersPerHour=мм/ч +MillimetersPerMinutes=мм/мин +MillimetersPerSecond=мм/с +NanometersPerMinutes=нм/мин +NanometersPerSecond=нм/с diff --git a/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext new file mode 100644 index 0000000000..3071b34e25 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/StandardVolumeFlow.restext @@ -0,0 +1,9 @@ +StandardCubicCentimetersPerMinute=sccm +StandardCubicFeetPerHour=scfh +StandardCubicFeetPerMinute=scfm +StandardCubicFeetPerSecond=Sft³/s +StandardCubicMetersPerDay=Sm³/d +StandardCubicMetersPerHour=Sm³/h +StandardCubicMetersPerMinute=Sm³/min +StandardCubicMetersPerSecond=Sm³/s +StandardLitersPerMinute=slm diff --git a/UnitsNet/GeneratedCode/Resources/Temperature.restext b/UnitsNet/GeneratedCode/Resources/Temperature.restext new file mode 100644 index 0000000000..500ed8e00e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Temperature.restext @@ -0,0 +1,10 @@ +DegreesCelsius=°C +DegreesDelisle=°De +DegreesFahrenheit=°F +DegreesNewton=°N +DegreesRankine=°R +DegreesReaumur=°Ré +DegreesRoemer=°Rø +Kelvins=K +MillidegreesCelsius=m°C +SolarTemperatures=T⊙ diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext new file mode 100644 index 0000000000..b7d07466de --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/TemperatureChangeRate.restext @@ -0,0 +1,10 @@ +CentidegreesCelsiusPerSecond=c°C/s +DecadegreesCelsiusPerSecond=da°C/s +DecidegreesCelsiusPerSecond=d°C/s +DegreesCelsiusPerMinute=°C/min +DegreesCelsiusPerSecond=°C/s +HectodegreesCelsiusPerSecond=h°C/s +KilodegreesCelsiusPerSecond=k°C/s +MicrodegreesCelsiusPerSecond=µ°C/s +MillidegreesCelsiusPerSecond=m°C/s +NanodegreesCelsiusPerSecond=n°C/s diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext new file mode 100644 index 0000000000..bdef7ce2eb --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/TemperatureDelta.restext @@ -0,0 +1,9 @@ +DegreesCelsius=∆°C +DegreesDelisle=∆°De +DegreesFahrenheit=∆°F +DegreesNewton=∆°N +DegreesRankine=∆°R +DegreesReaumur=∆°Ré +DegreesRoemer=∆°Rø +Kelvins=∆K +MillidegreesCelsius=∆m°C diff --git a/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext new file mode 100644 index 0000000000..207a5d5278 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/TemperatureGradient.restext @@ -0,0 +1,4 @@ +DegreesCelciusPerKilometer=∆°C/km +DegreesCelciusPerMeter=∆°C/m +DegreesFahrenheitPerFoot=∆°F/ft +KelvinsPerMeter=∆°K/m diff --git a/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext new file mode 100644 index 0000000000..40dde39cde --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ThermalConductivity.restext @@ -0,0 +1,2 @@ +BtusPerHourFootFahrenheit=BTU/h·ft·°F +WattsPerMeterKelvin=W/m·K diff --git a/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext b/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext new file mode 100644 index 0000000000..254857bb3c --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/ThermalResistance.restext @@ -0,0 +1,6 @@ +HourSquareFeetDegreesFahrenheitPerBtu=Hrft²°F/Btu +SquareCentimeterHourDegreesCelsiusPerKilocalorie=cm²Hr°C/kcal +SquareCentimeterKelvinsPerWatt=cm²K/W +SquareMeterDegreesCelsiusPerWatt=m²°C/W +SquareMeterKelvinsPerKilowatt=m²K/kW +SquareMeterKelvinsPerWatt=m²K/W diff --git a/UnitsNet/GeneratedCode/Resources/Torque.restext b/UnitsNet/GeneratedCode/Resources/Torque.restext new file mode 100644 index 0000000000..ce23b5c2b3 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Torque.restext @@ -0,0 +1,25 @@ +GramForceCentimeters=gf·cm +GramForceMeters=gf·m +GramForceMillimeters=gf·mm +KilogramForceCentimeters=kgf·cm +KilogramForceMeters=kgf·m +KilogramForceMillimeters=kgf·mm +KilonewtonCentimeters=kN·cm +KilonewtonMeters=kN·m +KilonewtonMillimeters=kN·mm +KilopoundForceFeet=kipf·ft +KilopoundForceInches=kipf·in +MeganewtonCentimeters=MN·cm +MeganewtonMeters=MN·m +MeganewtonMillimeters=MN·mm +MegapoundForceFeet=Mlbf·ft +MegapoundForceInches=Mlbf·in +NewtonCentimeters=N·cm +NewtonMeters=N·m +NewtonMillimeters=N·mm +PoundalFeet=pdl·ft +PoundForceFeet=lbf·ft +PoundForceInches=lbf·in +TonneForceCentimeters=tf·cm +TonneForceMeters=tf·m +TonneForceMillimeters=tf·mm diff --git a/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext new file mode 100644 index 0000000000..4b690445d2 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Torque.ru-RU.restext @@ -0,0 +1,3 @@ +KilonewtonMeters=кН·м +MeganewtonMeters=МН·м +NewtonMeters=Н·м diff --git a/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext b/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext new file mode 100644 index 0000000000..c3f4ff7f53 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/TorquePerLength.restext @@ -0,0 +1,21 @@ +KilogramForceCentimetersPerMeter=kgf·cm/m +KilogramForceMetersPerMeter=kgf·m/m +KilogramForceMillimetersPerMeter=kgf·mm/m +KilonewtonCentimetersPerMeter=kN·cm/m +KilonewtonMetersPerMeter=kN·m/m +KilonewtonMillimetersPerMeter=kN·mm/m +KilopoundForceFeetPerFoot=kipf·ft/ft +KilopoundForceInchesPerFoot=kipf·in/ft +MeganewtonCentimetersPerMeter=MN·cm/m +MeganewtonMetersPerMeter=MN·m/m +MeganewtonMillimetersPerMeter=MN·mm/m +MegapoundForceFeetPerFoot=Mlbf·ft/ft +MegapoundForceInchesPerFoot=Mlbf·in/ft +NewtonCentimetersPerMeter=N·cm/m +NewtonMetersPerMeter=N·m/m +NewtonMillimetersPerMeter=N·mm/m +PoundForceFeetPerFoot=lbf·ft/ft +PoundForceInchesPerFoot=lbf·in/ft +TonneForceCentimetersPerMeter=tf·cm/m +TonneForceMetersPerMeter=tf·m/m +TonneForceMillimetersPerMeter=tf·mm/m diff --git a/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext new file mode 100644 index 0000000000..d138f411e5 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/TorquePerLength.ru-RU.restext @@ -0,0 +1,3 @@ +KilonewtonMetersPerMeter=кН·м/м +MeganewtonMetersPerMeter=МН·м/м +NewtonMetersPerMeter=Н·м/м diff --git a/UnitsNet/GeneratedCode/Resources/Turbidity.restext b/UnitsNet/GeneratedCode/Resources/Turbidity.restext new file mode 100644 index 0000000000..525d967754 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Turbidity.restext @@ -0,0 +1 @@ +NTU=NTU diff --git a/UnitsNet/GeneratedCode/Resources/VitaminA.restext b/UnitsNet/GeneratedCode/Resources/VitaminA.restext new file mode 100644 index 0000000000..fc917b12a7 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VitaminA.restext @@ -0,0 +1 @@ +InternationalUnits=IU diff --git a/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext b/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext new file mode 100644 index 0000000000..ebeade4a4f --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Volume.fr-CA.restext @@ -0,0 +1 @@ +BoardFeet=pmp,pied-planche,pied de planche diff --git a/UnitsNet/GeneratedCode/Resources/Volume.nb-NO.restext b/UnitsNet/GeneratedCode/Resources/Volume.nb-NO.restext new file mode 100644 index 0000000000..e69de29bb2 diff --git a/UnitsNet/GeneratedCode/Resources/Volume.restext b/UnitsNet/GeneratedCode/Resources/Volume.restext new file mode 100644 index 0000000000..91d61b934e --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Volume.restext @@ -0,0 +1,46 @@ +AcreFeet=ac-ft,acre-foot,acre-feet +BoardFeet=bf,board foot,board feet +Centiliters=cl +CubicCentimeters=cm³ +CubicDecimeters=dm³ +CubicFeet=ft³ +CubicHectometers=hm³ +CubicInches=in³ +CubicKilometers=km³ +CubicMeters=m³ +CubicMicrometers=µm³ +CubicMiles=mi³ +CubicMillimeters=mm³ +CubicYards=yd³ +Decaliters=dal +DecausGallons=dagal (U.S.) +Deciliters=dl +DeciusGallons=dgal (U.S.) +HectocubicFeet=hft³ +HectocubicMeters=hm³ +Hectoliters=hl +HectousGallons=hgal (U.S.) +ImperialBeerBarrels=bl (imp.) +ImperialGallons=gal (imp.) +ImperialOunces=oz (imp.) +ImperialPints=pt (imp.),UK pt,pt,p +KilocubicFeet=kft³ +KilocubicMeters=km³ +KiloimperialGallons=kgal (imp.) +Kiloliters=kl +KilousGallons=kgal (U.S.) +Liters=l +MegacubicFeet=Mft³ +MegaimperialGallons=Mgal (imp.) +Megaliters=Ml +MegausGallons=Mgal (U.S.) +MetricTeaspoons=tsp,t,ts,tspn,t.,ts.,tsp.,tspn.,teaspoon +Microliters=µl +Milliliters=ml +Nanoliters=nl +OilBarrels=bbl +UsBeerBarrels=bl (U.S.) +UsGallons=gal (U.S.) +UsOunces=oz (U.S.) +UsPints=pt (U.S.) +UsQuarts=qt (U.S.) diff --git a/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext new file mode 100644 index 0000000000..c1c94577cf --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/Volume.ru-RU.restext @@ -0,0 +1,37 @@ +Centiliters=сл +CubicCentimeters=см³ +CubicDecimeters=дм³ +CubicFeet=фут³ +CubicHectometers=гм³ +CubicInches=дюйм³ +CubicKilometers=км³ +CubicMeters=м³ +CubicMicrometers=мкм³ +CubicMiles=миля³ +CubicMillimeters=мм³ +CubicYards=ярд³ +Decaliters=дал +DecausGallons=даАмериканский галлон +Deciliters=дл +DeciusGallons=дАмериканский галлон +HectocubicFeet=гфут³ +HectocubicMeters=гм³ +Hectoliters=гл +HectousGallons=гАмериканский галлон +ImperialGallons=Английский галлон +ImperialOunces=Английская унция +KilocubicFeet=кфут³ +KilocubicMeters=км³ +KiloimperialGallons=кАнглийский галлон +Kiloliters=кл +KilousGallons=кАмериканский галлон +Liters=л +MegacubicFeet=Мфут³ +MegaimperialGallons=МАнглийский галлон +Megaliters=Мл +MegausGallons=МАмериканский галлон +Microliters=мкл +Milliliters=мл +Nanoliters=нл +UsGallons=Американский галлон +UsOunces=Американская унция diff --git a/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext new file mode 100644 index 0000000000..98a5569828 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumeConcentration.restext @@ -0,0 +1,20 @@ +CentilitersPerLiter=cL/L +CentilitersPerMililiter=cL/mL +DecilitersPerLiter=dL/L +DecilitersPerMililiter=dL/mL +DecimalFractions= +LitersPerLiter=L/L +LitersPerMililiter=L/mL +MicrolitersPerLiter=µL/L +MicrolitersPerMililiter=µL/mL +MillilitersPerLiter=mL/L +MillilitersPerMililiter=mL/mL +NanolitersPerLiter=nL/L +NanolitersPerMililiter=nL/mL +PartsPerBillion=ppb +PartsPerMillion=ppm +PartsPerThousand=‰ +PartsPerTrillion=ppt +Percent=%,% (v/v) +PicolitersPerLiter=pL/L +PicolitersPerMililiter=pL/mL diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext new file mode 100644 index 0000000000..73c8bc54e0 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlow.restext @@ -0,0 +1,67 @@ +AcreFeetPerDay=af/d +AcreFeetPerHour=af/h +AcreFeetPerMinute=af/m +AcreFeetPerSecond=af/s +CentilitersPerDay=cl/day,cL/d,cLPD +CentilitersPerHour=cL/h,cLPH +CentilitersPerMinute=cL/min,cLPM +CentilitersPerSecond=cL/s,cLPS +CubicCentimetersPerMinute=cm³/min +CubicDecimetersPerMinute=dm³/min +CubicFeetPerHour=ft³/h,cf/hr +CubicFeetPerMinute=ft³/min,CFM +CubicFeetPerSecond=ft³/s +CubicMetersPerDay=m³/d +CubicMetersPerHour=m³/h +CubicMetersPerMinute=m³/min +CubicMetersPerSecond=m³/s +CubicMillimetersPerSecond=mm³/s +CubicYardsPerDay=cy/day +CubicYardsPerHour=yd³/h +CubicYardsPerMinute=yd³/min +CubicYardsPerSecond=yd³/s +DecilitersPerDay=dl/day,dL/d,dLPD +DecilitersPerHour=dL/h,dLPH +DecilitersPerMinute=dL/min,dLPM +DecilitersPerSecond=dL/s,dLPS +KilolitersPerDay=kl/day,kL/d,kLPD +KilolitersPerHour=kL/h,kLPH +KilolitersPerMinute=kL/min,kLPM +KilolitersPerSecond=kL/s,kLPS +KilousGallonsPerMinute=kgal (U.S.)/min,KGPM +LitersPerDay=l/day,L/d,LPD +LitersPerHour=L/h,LPH +LitersPerMinute=L/min,LPM +LitersPerSecond=L/s,LPS +MegalitersPerDay=Ml/day,ML/d,MLPD +MegalitersPerHour=ML/h,MLPH +MegalitersPerMinute=ML/min,MLPM +MegalitersPerSecond=ML/s,MLPS +MegaukGallonsPerDay=Mgal (U. K.)/d +MegaukGallonsPerSecond=Mgal (imp.)/s +MegausGallonsPerDay=Mgpd,Mgal/d +MicrolitersPerDay=µl/day,µL/d,µLPD +MicrolitersPerHour=µL/h,µLPH +MicrolitersPerMinute=µL/min,µLPM +MicrolitersPerSecond=µL/s,µLPS +MillilitersPerDay=ml/day,mL/d,mLPD +MillilitersPerHour=mL/h,mLPH +MillilitersPerMinute=mL/min,mLPM +MillilitersPerSecond=mL/s,mLPS +MillionUsGallonsPerDay=MGD +NanolitersPerDay=nl/day,nL/d,nLPD +NanolitersPerHour=nL/h,nLPH +NanolitersPerMinute=nL/min,nLPM +NanolitersPerSecond=nL/s,nLPS +OilBarrelsPerDay=bbl/d,BOPD +OilBarrelsPerHour=bbl/hr,bph +OilBarrelsPerMinute=bbl/min,bpm +OilBarrelsPerSecond=bbl/s +UkGallonsPerDay=gal (U. K.)/d +UkGallonsPerHour=gal (imp.)/h +UkGallonsPerMinute=gal (imp.)/min +UkGallonsPerSecond=gal (imp.)/s +UsGallonsPerDay=gpd,gal/d +UsGallonsPerHour=gal (U.S.)/h +UsGallonsPerMinute=gal (U.S.)/min,GPM +UsGallonsPerSecond=gal (U.S.)/s diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext new file mode 100644 index 0000000000..6e5a483b50 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlow.ru-RU.restext @@ -0,0 +1,30 @@ +CentilitersPerHour=сл/ч +CentilitersPerMinute=сл/мин +CentilitersPerSecond=сл/c +CubicCentimetersPerMinute=см³/мин +CubicDecimetersPerMinute=дм³/мин +CubicMetersPerHour=м³/ч +CubicMetersPerMinute=м³/мин +CubicMetersPerSecond=м³/с +CubicMillimetersPerSecond=мм³/с +DecilitersPerHour=дл/ч +DecilitersPerMinute=дл/мин +DecilitersPerSecond=дл/c +KilolitersPerHour=кл/ч +KilolitersPerMinute=кл/мин +KilolitersPerSecond=кл/c +LitersPerHour=л/ч +LitersPerMinute=л/мин +LitersPerSecond=л/c +MegalitersPerHour=Мл/ч +MegalitersPerMinute=Мл/мин +MegalitersPerSecond=Мл/c +MicrolitersPerHour=мкл/ч +MicrolitersPerMinute=мкл/мин +MicrolitersPerSecond=мкл/c +MillilitersPerHour=мл/ч +MillilitersPerMinute=мл/мин +MillilitersPerSecond=мл/c +NanolitersPerHour=нл/ч +NanolitersPerMinute=нл/мин +NanolitersPerSecond=нл/c diff --git a/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext new file mode 100644 index 0000000000..11724fc3d4 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumeFlowPerArea.restext @@ -0,0 +1,2 @@ +CubicFeetPerMinutePerSquareFoot=CFM/ft² +CubicMetersPerSecondPerSquareMeter=m³/(s·m²) diff --git a/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext b/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext new file mode 100644 index 0000000000..d2edb611f0 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumePerLength.restext @@ -0,0 +1,9 @@ +CubicMetersPerMeter=m³/m +CubicYardsPerFoot=yd³/ft +CubicYardsPerUsSurveyFoot=yd³/ftUS +ImperialGallonsPerMile=gal (imp.)/mi +LitersPerKilometer=l/km +LitersPerMeter=l/m +LitersPerMillimeter=l/mm +OilBarrelsPerFoot=bbl/ft +UsGallonsPerMile=gal (U.S.)/mi diff --git a/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext new file mode 100644 index 0000000000..fe8f856155 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/VolumetricHeatCapacity.restext @@ -0,0 +1,9 @@ +BtusPerCubicFootDegreeFahrenheit=BTU/ft³·°F +CaloriesPerCubicCentimeterDegreeCelsius=cal/cm³·°C +JoulesPerCubicMeterDegreeCelsius=J/m³·°C +JoulesPerCubicMeterKelvin=J/m³·K +KilocaloriesPerCubicCentimeterDegreeCelsius=kcal/cm³·°C +KilojoulesPerCubicMeterDegreeCelsius=kJ/m³·°C +KilojoulesPerCubicMeterKelvin=kJ/m³·K +MegajoulesPerCubicMeterDegreeCelsius=MJ/m³·°C +MegajoulesPerCubicMeterKelvin=MJ/m³·K diff --git a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext new file mode 100644 index 0000000000..aacc58de54 --- /dev/null +++ b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext @@ -0,0 +1,6 @@ +CentimetersToTheSixth=cm⁶,cm^6 +DecimetersToTheSixth=dm⁶,dm^6 +FeetToTheSixth=ft⁶,ft^6 +InchesToTheSixth=in⁶,in^6 +MetersToTheSixth=m⁶,m^6 +MillimetersToTheSixth=mm⁶,mm^6 diff --git a/UnitsNet/QuantityInfoLookup.cs b/UnitsNet/QuantityInfoLookup.cs new file mode 100644 index 0000000000..0aed43177b --- /dev/null +++ b/UnitsNet/QuantityInfoLookup.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Linq; + +namespace UnitsNet +{ + /// + /// A collection of . + /// + public class QuantityInfoLookup + { + private readonly Lazy InfosLazy; + private readonly Lazy> UnitTypeAndNameToUnitInfoLazy; + + /// + /// New instance. + /// + public QuantityInfoLookup() + { + ICollection quantityInfos = Quantity.ByName.Values; + Names = quantityInfos.Select(qt => qt.Name).ToArray(); + + InfosLazy = new Lazy(() => quantityInfos + .OrderBy(quantityInfo => quantityInfo.Name) + .ToArray()); + + UnitTypeAndNameToUnitInfoLazy = new Lazy>(() => + { + return Infos + .SelectMany(quantityInfo => quantityInfo.UnitInfos + .Select(unitInfo => new KeyValuePair<(Type, string), UnitInfo>( + (unitInfo.Value.GetType(), unitInfo.Name), + unitInfo))) + .ToDictionary(x => x.Key, x => x.Value); + }); + } + + /// + /// All enum value names of , such as "Length" and "Mass". + /// + public string[] Names { get; } + + /// + /// All quantity information objects, such as and . + /// + public QuantityInfo[] Infos => InfosLazy.Value; + + /// + /// Get for a given unit enum value. + /// + public UnitInfo GetUnitInfo(Enum unitEnum) => UnitTypeAndNameToUnitInfoLazy.Value[(unitEnum.GetType(), unitEnum.ToString())]; + + /// + /// Try to get for a given unit enum value. + /// + public bool TryGetUnitInfo(Enum unitEnum, [NotNullWhen(true)] out UnitInfo? unitInfo) => + UnitTypeAndNameToUnitInfoLazy.Value.TryGetValue((unitEnum.GetType(), unitEnum.ToString()), out unitInfo); + + /// + /// + /// + /// + /// + public void AddUnitInfo(Enum unit, UnitInfo unitInfo) + { + UnitTypeAndNameToUnitInfoLazy.Value.Add((unit.GetType(), unit.ToString()), unitInfo); + } + + /// + /// Dynamically construct a quantity. + /// + /// Numeric value. + /// Unit enum value. + /// An object. + /// Unit value is not a know unit enum type. + public IQuantity From(QuantityValue value, Enum unit) + { + if (Quantity.TryFrom(value, unit, out IQuantity? quantity)) + return quantity; + + throw new ArgumentException( + $"Unit value {unit} of type {unit.GetType()} is not a known unit enum type. Expected types like UnitsNet.Units.LengthUnit. Did you pass in a third-party enum type defined outside UnitsNet library?"); + } + + /// + public bool TryFrom(double value, Enum unit, [NotNullWhen(true)] out IQuantity? quantity) + { + // Implicit cast to QuantityValue would prevent TryFrom from being called, + // so we need to explicitly check this here for double arguments. + if (double.IsNaN(value) || double.IsInfinity(value)) + { + quantity = default(IQuantity); + return false; + } + + return Quantity.TryFrom((QuantityValue)value, unit, out quantity); + } + + /// + public IQuantity Parse(Type quantityType, string quantityString) => Parse(null, quantityType, quantityString); + + /// + /// Dynamically parse a quantity string representation. + /// + /// The format provider to use for lookup. Defaults to if null. + /// Type of quantity, such as . + /// Quantity string representation, such as "1.5 kg". Must be compatible with given quantity type. + /// The parsed quantity. + /// Type must be of type UnitsNet.IQuantity -or- Type is not a known quantity type. + public IQuantity Parse(IFormatProvider? formatProvider, Type quantityType, string quantityString) + { + if (!typeof(IQuantity).IsAssignableFrom(quantityType)) + throw new ArgumentException($"Type {quantityType} must be of type UnitsNet.IQuantity."); + + if (Quantity.TryParse(formatProvider, quantityType, quantityString, out IQuantity? quantity)) + return quantity; + + throw new ArgumentException($"Quantity string could not be parsed to quantity {quantityType}."); + } + + /// + public bool TryParse(Type quantityType, string quantityString, [NotNullWhen(true)] out IQuantity? quantity) => + Quantity.TryParse(null, quantityType, quantityString, out quantity); + + /// + /// Get a list of quantities that has the given base dimensions. + /// + /// The base dimensions to match. + public IEnumerable GetQuantitiesWithBaseDimensions(BaseDimensions baseDimensions) + { + return InfosLazy.Value.Where(info => info.BaseDimensions.Equals(baseDimensions)); + } + } +} diff --git a/UnitsNet/UnitInfo.cs b/UnitsNet/UnitInfo.cs index 7fc673ea87..056614c35a 100644 --- a/UnitsNet/UnitInfo.cs +++ b/UnitsNet/UnitInfo.cs @@ -2,6 +2,10 @@ // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Globalization; +using System.Resources; using UnitsNet.Units; namespace UnitsNet @@ -17,6 +21,8 @@ namespace UnitsNet /// public class UnitInfo { + private readonly object _syncRoot = new(); + /// /// Creates an instance of the UnitInfo class. /// @@ -29,6 +35,21 @@ public UnitInfo(Enum value, string pluralName, BaseUnits baseUnits) Name = value.ToString(); PluralName = pluralName; BaseUnits = baseUnits ?? throw new ArgumentNullException(nameof(baseUnits)); + + AbbreviationsMap = new ConcurrentDictionary>>(); + } + + /// + /// Creates an instance of the UnitInfo class. + /// + /// The enum value for this class, for example . + /// The plural name of the unit, such as "Centimeters". + /// The for this unit. + /// The quantity name that this unit is for. + internal UnitInfo(Enum value, string pluralName, BaseUnits baseUnits, string quantityName) : + this(value, pluralName, baseUnits) + { + QuantityName = quantityName; } /// @@ -50,6 +71,87 @@ public UnitInfo(Enum value, string pluralName, BaseUnits baseUnits) /// Gets the for this unit. /// public BaseUnits BaseUnits { get; } + + private string? QuantityName { get; } + + /// + /// The per-culture abbreviations. To add a custom default abbreviation, add to the beginning of the list. + /// + private IDictionary>> AbbreviationsMap { get; } + + /// + /// + /// + /// + /// + /// + public IReadOnlyList GetAbbreviations(IFormatProvider? formatProvider = null) + { + if(formatProvider is null || formatProvider is not CultureInfo) + formatProvider = CultureInfo.CurrentCulture; + + var culture = (CultureInfo)formatProvider; + + if(!AbbreviationsMap.TryGetValue(culture, out var abbreviations)) + AbbreviationsMap[culture] = abbreviations = new Lazy>(() => ReadAbbreviationsFromResourceFile(culture)); + + if(abbreviations.Value.Count == 0 && !culture.Equals(UnitAbbreviationsCache.FallbackCulture)) + return GetAbbreviations(UnitAbbreviationsCache.FallbackCulture); + else + return abbreviations.Value; + } + + /// + /// + /// + /// + /// + /// + /// + public void AddAbbreviation(IFormatProvider? formatProvider, bool setAsDefault, bool allowAbbreviationLookup, params string[] abbreviations) + { + if(formatProvider is null || formatProvider is not CultureInfo) + formatProvider = CultureInfo.CurrentCulture; + + var culture = (CultureInfo)formatProvider; + + // Restrict concurrency on writes. + // By using ConcurrencyDictionary and immutable IReadOnlyList instances, we don't need to lock on reads. + lock(_syncRoot) + { + var currentAbbreviationsList = new List(GetAbbreviations(culture)); + + foreach(var abbreviation in abbreviations) + { + if(!currentAbbreviationsList.Contains(abbreviation)) + { + if(setAsDefault) + currentAbbreviationsList.Insert(0, abbreviation); + else + currentAbbreviationsList.Add(abbreviation); + } + } + + AbbreviationsMap[culture] = new Lazy>(() => currentAbbreviationsList.AsReadOnly()); + } + } + + private IReadOnlyList ReadAbbreviationsFromResourceFile(CultureInfo culture) + { + var abbreviationsList = new List(); + + if(QuantityName is not null) + { + string resourceName = $"UnitsNet.GeneratedCode.Resources.{QuantityName}"; + var resourceManager = new ResourceManager(resourceName, GetType().Assembly); + + var abbreviationsString = resourceManager.GetString(PluralName, culture); + if(abbreviationsString is not null) + abbreviationsList.AddRange(abbreviationsString.Split(',')); + } + + return abbreviationsList.AsReadOnly(); + } } /// @@ -63,7 +165,15 @@ public class UnitInfo : UnitInfo where TUnit : Enum { /// - public UnitInfo(TUnit value, string pluralName, BaseUnits baseUnits) : base(value, pluralName, baseUnits) + public UnitInfo(TUnit value, string pluralName, BaseUnits baseUnits) : + base(value, pluralName, baseUnits) + { + Value = value; + } + + /// + internal UnitInfo(TUnit value, string pluralName, BaseUnits baseUnits, string quantityName) : + base(value, pluralName, baseUnits, quantityName) { Value = value; } diff --git a/UnitsNet/UnitsNet.csproj b/UnitsNet/UnitsNet.csproj index a1ce4bc8dd..035681bf90 100644 --- a/UnitsNet/UnitsNet.csproj +++ b/UnitsNet/UnitsNet.csproj @@ -1,4 +1,4 @@ - + UnitsNet @@ -65,4 +65,8 @@ + + + +