public AdditionOfConvertersConverter(UnitConverter first, UnitConverter second) { this.first = first; this.second = second; }
public ProductOfConvertersConverter(UnitConverter first, UnitConverter second) { this.first = first; this.second = second; }
internal CompoundConverter(UnitConverter first, UnitConverter second) { this.first = first; this.second = second; }
/// <summary> /// Concatenates this converter with another converter. The resulting converter /// is equivalent to the first converter concatenated with this converter. /// /// Implementations must ensure that the IDENTITY instance is returned if the /// resulting converter is an identity converter. /// </summary> /// <param name="converter">The converter to concatenate with this converter.</param> /// <returns>The concatenation of this converter with the other</returns> public virtual UnitConverter Concatenate(UnitConverter converter) { return(converter == IDENTITY ? this : new CompoundConverter(converter, this)); }
public override UnitConverter Concatenate(UnitConverter converter) { return(converter); }