Ejemplo n.º 1
0
        /// <summary>
        /// Converts the quantity value of this instance to its equivalent string representation.
        /// </summary>
        /// <param name="valueFormat">The format to use for the scalar value. Valid formats are formats valid for formatting <see cref="double"/></param>
        /// <param name="unit">The unit to use in the conversion</param>
        /// <param name="formatProvider">Specifies the <see cref="IFormatProvider"/> to use when creating the string representation.</param>
        /// <returns>The string representation of the value of this instance.</returns>
        public string ToString(string valueFormat, AngularJerkUnit unit, IFormatProvider formatProvider)
        {
            var quantityFormat = FormatCache <AngularJerkUnit> .GetOrCreate(valueFormat, unit);

            return(this.ToString(quantityFormat, formatProvider));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns a string with the <see cref="SiValue"/> and <see cref="SiUnit"/>
        /// </summary>
        /// <param name="provider">Specifies the formatProvider to be used.</param>
        /// <returns>The string representation of the <see cref="CatalyticActivity"/></returns>
        public string ToString(IFormatProvider provider)
        {
            var quantityFormat = FormatCache <CatalyticActivityUnit> .GetOrCreate(string.Empty, SiUnit);

            return(ToString(quantityFormat, provider));
        }
Ejemplo n.º 3
0
        /// <summary>
        ///  If an invalid format is provided the string will look like: {value: ??} {unit: ??}
        /// </summary>
        /// <param name="valueFormat">For formatting the scalar, format stings valid for <see cref="System.Double"/> are valid
        ///  ex: F2</param>
        /// <param name="symbolFormat">For formatting the unit ex kat</param>
        /// <param name="formatProvider"></param>
        /// <returns>The string representation of the <see cref="CatalyticActivity"/></returns>
        public string ToString(string valueFormat, string symbolFormat, IFormatProvider formatProvider)
        {
            var quantityFormat = FormatCache <CatalyticActivityUnit> .GetOrCreate(valueFormat, symbolFormat);

            return(ToString(quantityFormat, formatProvider));
        }
Ejemplo n.º 4
0
        public string ToString(UnitlessUnit unit, IFormatProvider formatProvider)
        {
            var quantityFormat = FormatCache <UnitlessUnit> .GetOrCreate(null, unit);

            return(this.ToString(quantityFormat, formatProvider));
        }
Ejemplo n.º 5
0
        public string ToString(string valueFormat, UnitlessUnit unit, SymbolFormat symbolFormat, IFormatProvider formatProvider)
        {
            var quantityFormat = FormatCache <UnitlessUnit> .GetOrCreate(valueFormat, unit, symbolFormat);

            return(this.ToString(quantityFormat, formatProvider));
        }
Ejemplo n.º 6
0
        public string ToString(IFormatProvider provider)
        {
            var quantityFormat = FormatCache <UnitlessUnit> .GetOrCreate(string.Empty, this.SiUnit);

            return(this.ToString(quantityFormat, provider));
        }
Ejemplo n.º 7
0
        public string ToString(string valueFormat, string symbolFormat)
        {
            var quantityFormat = FormatCache <UnitlessUnit> .GetOrCreate(valueFormat, symbolFormat);

            return(this.ToString(quantityFormat, (IFormatProvider?)null));
        }
Ejemplo n.º 8
0
        /// <summary>
        /// If an invalid format is provided the string will look like: {value: ??} {unit: ??}
        /// </summary>
        /// <param name="format">Must be a composite format ex: \"F2 N/ul\"</param>
        /// <returns>The string representation of the <see cref="ForcePerUnitless"/></returns>
        public string ToString(string format)
        {
            var quantityFormat = FormatCache <ForcePerUnitlessUnit> .GetOrCreate(format);

            return(ToString(quantityFormat, (IFormatProvider)null));
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Converts the quantity value of this instance to its equivalent string representation.
        /// </summary>
        /// <param name="unit">The unit to use in the conversion</param>
        /// <returns>The string representation of the value of this instance.</returns>
        public string ToString(ForcePerUnitlessUnit unit)
        {
            var quantityFormat = FormatCache <ForcePerUnitlessUnit> .GetOrCreate(null, unit);

            return(ToString(quantityFormat, null));
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Converts the quantity value of this instance to its equivalent string representation.
        /// </summary>
        /// <param name="valueFormat">The format to use for the scalar value. Valid formats are formats valid for formatting <see cref="double"/></param>
        /// <param name="unit">The unit to use in the conversion</param>
        /// <returns>The string representation of the value of this instance.</returns>
        public string ToString(string valueFormat, AreaDensityUnit unit)
        {
            var quantityFormat = FormatCache <AreaDensityUnit> .GetOrCreate(valueFormat, unit);

            return(ToString(quantityFormat, null));
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Converts the quantity value of this instance to its equivalent string representation.
        /// </summary>
        /// <param name="valueFormat">The format to use for the scalar value. Valid formats are formats valid for formatting <see cref="double"/></param>
        /// <param name="unit">The unit to use in the conversion</param>
        /// <param name="symbolFormat">Specifies the symbol format to use when creating the string representation.</param>///
        /// <param name="formatProvider">Specifies the <see cref="IFormatProvider"/> to use when creating the string representation.</param>
        /// <returns>The string representation of the value of this instance.</returns>
        public string ToString(string valueFormat, AreaDensityUnit unit, SymbolFormat symbolFormat, IFormatProvider formatProvider)
        {
            var quantityFormat = FormatCache <AreaDensityUnit> .GetOrCreate(valueFormat, unit, symbolFormat);

            return(ToString(quantityFormat, formatProvider));
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Converts the quantity value of this instance to its equivalent string representation.
        /// </summary>
        /// <param name="unit">The unit to use in the conversion</param>
        /// <param name="formatProvider">Specifies the <see cref="IFormatProvider"/> to use when creting the string representation.</param>
        /// <returns>The string representation of the value of this instance.</returns>
        public string ToString(AreaDensityUnit unit, IFormatProvider formatProvider)
        {
            var quantityFormat = FormatCache <AreaDensityUnit> .GetOrCreate(null, unit);

            return(ToString(quantityFormat, formatProvider));
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Converts the quantity value of this instance to its equivalent string representation.
        /// </summary>
        /// <param name="unit">The unit to use in the conversion</param>
        /// <param name="symbolFormat">Specifies the symbol format to use when creting the string representation.</param>
        /// <returns>The string representation of the value of this instance.</returns>
        public string ToString(AreaDensityUnit unit, SymbolFormat symbolFormat)
        {
            var quantityFormat = FormatCache <AreaDensityUnit> .GetOrCreate(null, unit, symbolFormat);

            return(ToString(quantityFormat, null));
        }
Ejemplo n.º 14
0
        /// <summary>
        ///  If an invalid format is provided the string will look like: {value: ??} {unit: ??}
        /// </summary>
        /// <param name="valueFormat">For formatting the scalar, format stings valid for <see cref="System.Double"/> are valid
        ///  ex: F2</param>
        /// <param name="symbolFormat">For formatting of the unit ex kg/m²</param>
        /// <returns>The string representation of the <see cref="AreaDensity"/></returns>
        public string ToString(string valueFormat, string symbolFormat)
        {
            var quantityFormat = FormatCache <AreaDensityUnit> .GetOrCreate(valueFormat, symbolFormat);

            return(ToString(quantityFormat, (IFormatProvider)null));
        }
        public string ToString(string valueFormat, SpecificEnergyUnit unit, IFormatProvider formatProvider)
        {
            var quantityFormat = FormatCache <SpecificEnergyUnit> .GetOrCreate(valueFormat, unit);

            return(this.ToString(quantityFormat, formatProvider));
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Converts the quantity value of this instance to its equivalent string representation.
        /// </summary>
        /// <param name="unit">The unit to use in the conversion</param>
        /// <param name="symbolFormat">Specifies the symbol format to use when creting the string representation.</param>
        /// <param name="formatProvider">Specifies the <see cref="IFormatProvider"/> to use when creting the string representation.</param>
        /// <returns>The string representation of the value of this instance.</returns>
        public string ToString(ForcePerUnitlessUnit unit, SymbolFormat symbolFormat, IFormatProvider formatProvider)
        {
            var quantityFormat = FormatCache <ForcePerUnitlessUnit> .GetOrCreate(null, unit, symbolFormat);

            return(ToString(quantityFormat, formatProvider));
        }
Ejemplo n.º 17
0
        public override string ToString()
        {
            var quantityFormat = FormatCache <UnitlessUnit> .GetOrCreate(null, this.SiUnit);

            return(this.ToString(quantityFormat, (IFormatProvider?)null));
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Converts the quantity value of this instance to its equivalent string representation.
        /// </summary>
        /// <param name="valueFormat">The format to use for the scalar value. Valid formats are formats valid for formatting <see cref="double"/></param>
        /// <param name="unit">The unit to use in the conversion</param>
        /// <param name="symbolFormat">Specifies the symbol format to use when creting the string representation.</param>
        /// <returns>The string representation of the value of this instance.</returns>
        public string ToString(string valueFormat, ForcePerUnitlessUnit unit, SymbolFormat symbolFormat)
        {
            var quantityFormat = FormatCache <ForcePerUnitlessUnit> .GetOrCreate(valueFormat, unit, symbolFormat);

            return(ToString(quantityFormat, null));
        }
Ejemplo n.º 19
0
        public string ToString(string?format, IFormatProvider?formatProvider)
        {
            var quantityFormat = FormatCache <UnitlessUnit> .GetOrCreate(format);

            return(this.ToString(quantityFormat, formatProvider));
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Converts the quantity value of this instance to its equivalent string representation.
        /// </summary>
        /// <param name="valueFormat">The format to use for the scalar value. Valid formats are formats valid for formatting <see cref="double"/></param>
        /// <param name="unit">The unit to use in the conversion</param>
        /// <param name="formatProvider">Specifies the <see cref="IFormatProvider"/> to use when creating the string representation.</param>
        /// <returns>The string representation of the value of this instance.</returns>
        public string ToString(string valueFormat, ForcePerUnitlessUnit unit, IFormatProvider formatProvider)
        {
            var quantityFormat = FormatCache <ForcePerUnitlessUnit> .GetOrCreate(valueFormat, unit);

            return(ToString(quantityFormat, formatProvider));
        }
Ejemplo n.º 21
0
        public string ToString(UnitlessUnit unit, SymbolFormat symbolFormat)
        {
            var quantityFormat = FormatCache <UnitlessUnit> .GetOrCreate(null, unit, symbolFormat);

            return(this.ToString(quantityFormat, null));
        }
        public string ToString(string format)
        {
            var quantityFormat = FormatCache <SpecificEnergyUnit> .GetOrCreate(format);

            return(this.ToString(quantityFormat, (IFormatProvider?)null));
        }
Ejemplo n.º 23
0
        public string ToString(string valueFormat, UnitlessUnit unit)
        {
            var quantityFormat = FormatCache <UnitlessUnit> .GetOrCreate(valueFormat, unit);

            return(this.ToString(quantityFormat, null));
        }
        public string ToString(SpecificEnergyUnit unit)
        {
            var quantityFormat = FormatCache <SpecificEnergyUnit> .GetOrCreate(null, unit);

            return(this.ToString(quantityFormat, null));
        }
Ejemplo n.º 25
0
        /// <summary>
        /// Returns a string with the <see cref="SiValue"/> and <see cref="SiUnit"/>
        /// </summary>
        /// <returns>The string representation of the <see cref="CatalyticActivity"/></returns>
        public override string ToString()
        {
            var quantityFormat = FormatCache <CatalyticActivityUnit> .GetOrCreate(null, this.SiUnit);

            return(this.ToString(quantityFormat, (IFormatProvider)null));
        }
        public string ToString(SpecificEnergyUnit unit, SymbolFormat symbolFormat, IFormatProvider formatProvider)
        {
            var quantityFormat = FormatCache <SpecificEnergyUnit> .GetOrCreate(null, unit, symbolFormat);

            return(this.ToString(quantityFormat, formatProvider));
        }
Ejemplo n.º 27
0
        /// <summary>
        /// If an invalid format is provided the string will look like: {value: ??} {unit: ??}
        /// </summary>
        /// <param name="format">Must be a composite format ex: \"F2 kat\"</param>
        /// <returns>The string representation of the <see cref="CatalyticActivity"/></returns>
        public string ToString(string format)
        {
            var quantityFormat = FormatCache <CatalyticActivityUnit> .GetOrCreate(format);

            return(ToString(quantityFormat, (IFormatProvider)null));
        }
        public string ToString(string valueFormat, SpecificEnergyUnit unit, SymbolFormat symbolFormat)
        {
            var quantityFormat = FormatCache <SpecificEnergyUnit> .GetOrCreate(valueFormat, unit, symbolFormat);

            return(this.ToString(quantityFormat, null));
        }
Ejemplo n.º 29
0
        /// <summary>
        /// Converts the quantity value of this instance to its equivalent string representation.
        /// </summary>
        /// <param name="unit">The unit to use in the conversion</param>
        /// <param name="symbolFormat">Specifies the symbol format to use when creting the string representation.</param>
        /// <returns>The string representation of the value of this instance.</returns>
        public string ToString(CatalyticActivityUnit unit, SymbolFormat symbolFormat)
        {
            var quantityFormat = FormatCache <CatalyticActivityUnit> .GetOrCreate(null, unit, symbolFormat);

            return(ToString(quantityFormat, null));
        }
Ejemplo n.º 30
0
        /// <summary>
        /// Converts the quantity value of this instance to its equivalent string representation.
        /// </summary>
        /// <param name="valueFormat">The format to use for the scalar value. Valid formats are formats valid for formatting <see cref="double"/></param>
        /// <param name="unit">The unit to use in the conversion</param>
        /// <param name="symbolFormat">Specifies the symbol format to use when creting the string representation.</param>
        /// <returns>The string representation of the value of this instance.</returns>
        public string ToString(string valueFormat, AngularJerkUnit unit, SymbolFormat symbolFormat)
        {
            var quantityFormat = FormatCache <AngularJerkUnit> .GetOrCreate(valueFormat, unit, symbolFormat);

            return(this.ToString(quantityFormat, null));
        }