Пример #1
0
 public ValueFormatter(
     Expression <Func <TInputValue, string> > formatValueExpression,
     ValueFormatterType valueFormatterType = ValueFormatterType.SingleProperty,
     string defaultValue = default)
 {
     FormatterType = valueFormatterType;
     FormatValue   = SanitizeConverter(formatValueExpression, defaultValue);
 }
Пример #2
0
 public ValueFormatter(LambdaExpression formatValueExpression, ValueFormatterType valueFormatterType = ValueFormatterType.SingleProperty)
 {
     FormatterType         = valueFormatterType;
     FormatValueExpression = formatValueExpression ?? throw new ArgumentNullException(nameof(formatValueExpression));
 }