Exemple #1
0
        public static string ParseAndFormat <TResult>(IStringParser <TResult> parser, FormatterEx.IValueFormatter <TResult> formatter, string text, Nparams param)
        {
            var value = parser.Parse(text, default(TResult), param);

            return(value != null ? formatter.Format(value, param) : string.Empty);
        }
Exemple #2
0
 public static string ParseAndFormat <TResult>(IStringParser <TResult> parser, FormatterEx.IValueFormatter <TResult> formatter, string text)
 {
     return(ParseAndFormat <TResult>(parser, formatter, text, null));
 }
Exemple #3
0
 public static string ParseAndFormat <TResult>(IObjectParser <TResult> parser, FormatterEx.IValueFormatter <TResult> formatter, object obj)
 {
     return(ParseAndFormat <TResult>(parser, formatter, obj, null));
 }
 public static string ParseAndFormat <TResult>(this string text, ParserEx.IStringParser <TResult> parser, FormatterEx.IValueFormatter <TResult> formatter)
 {
     return(ParseAndFormat <TResult>(text, parser, formatter, null));
 }
Exemple #5
0
        public static string ParseAndFormat <TResult>(this object obj, ParserEx.IObjectParser <TResult> parser, FormatterEx.IValueFormatter <TResult> formatter, Nparams param)
        {
            var value = parser.Parse(obj, default(TResult), param);

            return(value != null ? formatter.Format(value, param) : string.Empty);
        }
Exemple #6
0
 public static string ParseAndFormat <TResult>(this object obj, ParserEx.IObjectParser <TResult> parser, FormatterEx.IValueFormatter <TResult> formatter)
 {
     return(ParseAndFormat <TResult>(obj, parser, formatter, null));
 }