/// <summary> /// Reads an instance of <see cref="Gu.Units.VolumetricFlow"/> from the <paramref name="reader"/> /// </summary> /// <param name="reader"></param> /// <returns>An instance of <see cref="Gu.Units.VolumetricFlow"/></returns> public static VolumetricFlow ReadFrom(XmlReader reader) { var v = new VolumetricFlow(); v.ReadXml(reader); return(v); }
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { var text = value as string; if (text != null) { return(VolumetricFlow.Parse(text, culture)); } return(base.ConvertFrom(context, culture, value)); }
/// <summary> /// Multiplies <paramref name="left"/> with <paramref name="right"/> /// </summary> /// <param name="left">The left value</param> /// <param name="right">The right value</param> /// <returns>The <see cref="VolumetricFlow"/> that is the result from the multiplication.</returns> public static VolumetricFlow operator *(MassFlow left, SpecificVolume right) { return(VolumetricFlow.FromCubicMetresPerSecond(left.kilogramsPerSecond * right.cubicMetresPerKilogram)); }
/// <summary> /// Divides <paramref name="left"/> by <paramref name="right"/> /// </summary> /// <param name="left">The left value</param> /// <param name="right">The right value</param> /// <returns>The <see cref="VolumetricFlow"/> that is the result from the division.</returns> public static VolumetricFlow operator /(MassFlow left, Density right) { return(VolumetricFlow.FromCubicMetresPerSecond(left.kilogramsPerSecond / right.kilogramsPerCubicMetre)); }
/// <summary> /// Divides <paramref name="left"/> by <paramref name="right"/> /// </summary> /// <param name="left">The left value</param> /// <param name="right">The right value</param> /// <returns>The <see cref="VolumetricFlow"/> that is the result from the division.</returns> public static VolumetricFlow operator /(Momentum left, AreaDensity right) { return(VolumetricFlow.FromCubicMetresPerSecond(left.newtonSecond / right.kilogramsPerSquareMetre)); }
/// <summary> /// Multiplies <paramref name="left"/> with <paramref name="right"/> /// </summary> /// <param name="left">The left value</param> /// <param name="right">The right value</param> /// <returns>The <see cref="VolumetricFlow"/> that is the result from the multiplication.</returns> public static VolumetricFlow operator *(Speed left, Area right) { return(VolumetricFlow.FromCubicMetresPerSecond(left.metresPerSecond * right.squareMetres)); }
public static VolumetricFlow operator *(Frequency left, Volume right) { return(VolumetricFlow.FromCubicMetresPerSecond(left.hertz * right.cubicMetres)); }
/// <summary> /// Creates an instance of <see cref="Gu.Units.VolumetricFlow"/> from its string representation /// </summary> /// <param name="text">The string representation of the <see cref="Gu.Units.VolumetricFlow"/></param> /// <param name="styles">Specifies the <see cref="NumberStyles"/> to be used.</param> /// <param name="result">The parsed <see cref="VolumetricFlow"/></param> /// <returns>True if an instance of <see cref="VolumetricFlow"/> could be parsed from <paramref name="text"/></returns> public static bool TryParse(string text, NumberStyles styles, out VolumetricFlow result) { return(QuantityParser.TryParse <VolumetricFlowUnit, VolumetricFlow>(text, From, styles, CultureInfo.CurrentCulture, out result)); }
public static VolumetricFlow operator *(double left, VolumetricFlowUnit right) { return(VolumetricFlow.From(left, right)); }
/// <summary> /// Returns a quantity indicating whether this instance is equal to a specified <see cref="Gu.Units.VolumetricFlow"/> object within the given tolerance. /// </summary> /// <returns> /// true if <paramref name="other"/> represents the same VolumetricFlow as this instance; otherwise, false. /// </returns> /// <param name="other">An instance of <see cref="Gu.Units.VolumetricFlow"/> object to compare with this instance.</param> /// <param name="tolerance">The maximum difference for being considered equal. Must be greater than zero.</param> public bool Equals(VolumetricFlow other, VolumetricFlow tolerance) { Ensure.GreaterThan(tolerance.cubicMetresPerSecond, 0, nameof(tolerance)); return(Math.Abs(this.cubicMetresPerSecond - other.cubicMetresPerSecond) < tolerance.cubicMetresPerSecond); }
/// <summary> /// Returns a quantity indicating whether this instance is equal to a specified <see cref="Gu.Units.VolumetricFlow"/> object. /// </summary> /// <returns> /// true if <paramref name="other"/> represents the same VolumetricFlow as this instance; otherwise, false. /// </returns> /// <param name="other">An instance of <see cref="Gu.Units.VolumetricFlow"/> object to compare with this instance.</param> public bool Equals(VolumetricFlow other) { return(this.cubicMetresPerSecond.Equals(other.cubicMetresPerSecond)); }
/// <summary> /// Compares this instance to a specified <see cref="Gu.Units.VolumetricFlow"/> object and returns an integer that indicates whether this <paramref name="quantity"/> is smaller than, equal to, or greater than the <see cref="Gu.Units.VolumetricFlow"/> object. /// </summary> /// <returns> /// A signed number indicating the relative quantitys of this instance and <paramref name="quantity"/>. /// /// Value /// /// Description /// /// A negative integer /// /// This instance is smaller than <paramref name="quantity"/>. /// /// Zero /// /// This instance is equal to <paramref name="quantity"/>. /// /// A positive integer /// /// This instance is larger than <paramref name="quantity"/>. /// /// </returns> /// <param name="quantity">An instance of <see cref="Gu.Units.VolumetricFlow"/> object to compare to this instance.</param> public int CompareTo(VolumetricFlow quantity) { return(this.cubicMetresPerSecond.CompareTo(quantity.cubicMetresPerSecond)); }
/// <summary> /// Creates an instance of <see cref="Gu.Units.VolumetricFlow"/> from its string representation /// </summary> /// <param name="text">The string representation of the <see cref="Gu.Units.VolumetricFlow"/></param> /// <param name="styles">Specifies the <see cref="NumberStyles"/> to be used.</param> /// <param name="provider">Specifies the formatProvider to be used.</param> /// <param name="result">The parsed <see cref="VolumetricFlow"/></param> /// <returns>True if an instance of <see cref="VolumetricFlow"/> could be parsed from <paramref name="text"/></returns> public static bool TryParse(string text, NumberStyles styles, IFormatProvider provider, out VolumetricFlow result) { return(QuantityParser.TryParse <VolumetricFlowUnit, VolumetricFlow>(text, From, styles, provider, out result)); }
/// <summary> /// Multiplies <paramref name="left"/> with <paramref name="right"/> /// </summary> /// <param name="left">The left value</param> /// <param name="right">The right value</param> /// <returns>The <see cref="VolumetricFlow"/> that is the result from the multiplication.</returns> public static VolumetricFlow operator *(KinematicViscosity left, Length right) { return(VolumetricFlow.FromCubicMetresPerSecond(left.squareMetresPerSecond * right.metres)); }
public static VolumetricFlow operator /(Volume left, Time right) { return(VolumetricFlow.FromCubicMetresPerSecond(left.cubicMetres / right.seconds)); }
/// <summary> /// Divides <paramref name="left"/> by <paramref name="right"/> /// </summary> /// <param name="left">The left value</param> /// <param name="right">The right value</param> /// <returns>The <see cref="VolumetricFlow"/> that is the result from the division.</returns> public static VolumetricFlow operator /(KinematicViscosity left, Wavenumber right) { return(VolumetricFlow.FromCubicMetresPerSecond(left.squareMetresPerSecond / right.reciprocalMetres)); }
/// <summary> /// Divides <paramref name="left"/> by <paramref name="right"/> /// </summary> /// <param name="left">The left value</param> /// <param name="right">The right value</param> /// <returns>The <see cref="VolumetricFlow"/> that is the result from the division.</returns> public static VolumetricFlow operator /(Power left, Pressure right) { return(VolumetricFlow.FromCubicMetresPerSecond(left.watts / right.pascals)); }