Esempio n. 1
0
 public static FormatterBase Create(string format)
 {
     if (TimeSpanFormatter.CanFormat(format))
     {
         return(new TimeSpanFormatter(format));
     }
     return(new StringFormatter(format));
 }
Esempio n. 2
0
 public static FormatterBase Create(string format)
 {
     if (TimeSpanFormatter.CanFormat(format))
     {
         return(new TimeSpanFormatter(format));
     }
     if (TimeStampFormatter.CanFormat(format))
     {
         return(new TimeStampFormatter(format));
     }
     if (DecibelFormatter.CanFormat(format))
     {
         return(new DecibelFormatter(format));
     }
     if (FloatFormatter.CanFormat(format))
     {
         return(new FloatFormatter(format));
     }
     if (IntegerFormatter.CanFormat(format))
     {
         return(new IntegerFormatter(format));
     }
     return(new StringFormatter(format));
 }