示例#1
0
 public AdditionOfConvertersConverter(UnitConverter first, UnitConverter second)
 {
     this.first  = first;
     this.second = second;
 }
示例#2
0
 public ProductOfConvertersConverter(UnitConverter first, UnitConverter second)
 {
     this.first  = first;
     this.second = second;
 }
示例#3
0
 internal CompoundConverter(UnitConverter first, UnitConverter second)
 {
     this.first  = first;
     this.second = second;
 }
示例#4
0
 /// <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));
 }
示例#5
0
 public override UnitConverter Concatenate(UnitConverter converter)
 {
     return(converter);
 }