public string FormatValue(object value, IValueFormattingService formattingService) { return(string.Format(formattingService.GetCultureInfo(), "s{0}", value)); }
public override string FormatValue(object value, IValueFormattingService formattingService) { return(string.Format(formattingService.GetCultureInfo(), "--{0}--", value)); }
#pragma warning disable 618 /// <summary> /// Formats provided <paramref name="value"/> and returns it's string representation. /// The provided <paramref name="formattingService"/> can be used to obtain current <see cref="CultureInfo"/> if needed. It can be also used to format inner values if formatted type is collection or complex object. /// /// By default, this method calls <see cref="Format"/>() for backward-compatibility and it should be overwritten by types extending <see cref="ParameterFormatterAttribute"/>. /// </summary> /// <param name="value">Value to format.</param> /// <param name="formattingService">Formatting service allowing to retrieve current <see cref="CultureInfo"/> or format inner values of provided object.</param> /// <returns>Formatted value.</returns> public virtual string FormatValue(object value, IValueFormattingService formattingService) { return(Format(formattingService.GetCultureInfo(), value)); }