/// <summary> /// Formats a value in the specified field presentation format. /// </summary> /// <param name="values"> /// The values to format. /// </param> /// <param name="format"> /// The format to present the value in. /// </param> /// <returns> /// The formatted value. /// </returns> public string FormatValue(IEnumerable <string> values, FieldPresentationFormats format) { var instance = new T(); var configuration = instance.DeserializeConfiguration(FieldConfiguration); return(instance.FormatValue(values ?? new string[0], format, configuration)); }
/// <summary> /// Formats a value in the specified field presentation format. /// </summary> /// <param name="values"> /// The values to format. /// </param> /// <param name="format"> /// The format to present the value in. /// </param> /// <param name="configuration"> /// The configuration for this field. /// </param> /// <returns> /// The formatted value. /// </returns> public string FormatValue(IEnumerable <string> values, FieldPresentationFormats format, object configuration) { var castedConfig = configuration as TextConstantConfiguration; return(castedConfig?.Text); }
public string FormatValue(IEnumerable<string> values, FieldPresentationFormats format) { values = values.Select(x => new { Parsed = DateUtility.AttemptParseDate(x), Original = x }).Select(x => x.Parsed.HasValue ? x.Parsed.Value.ToString("MMMM dd, yyyy") : x.Original); var combined = string.Join(", ", values); return combined; }
/// <inheritdoc /> public string FormatValue(IEnumerable <string> values, FieldPresentationFormats format, object configuration) { values = values.Select(x => new { Parsed = DateUtility.AttemptParseDate(x), Original = x }).Select(x => x.Parsed.HasValue ? x.Parsed.Value.ToString("MMMM dd, yyyy") : x.Original); var combined = string.Join(", ", values); return(combined); }
public string FormatValue(IEnumerable <string> values, FieldPresentationFormats format, object configuration) { return(string.Join(", ", values)); }
/// <summary> /// Formats a value in the specified field presentation format. /// </summary> /// <param name="values"> /// The values to format. /// </param> /// <param name="format"> /// The format to present the value in. /// </param> /// <returns> /// The formatted value. /// </returns> public string FormatValue(IEnumerable <string> values, FieldPresentationFormats format) { return(null); }
public string FormatValue(IEnumerable<string> values, FieldPresentationFormats format) { return null; }
public string FormatValue(IEnumerable<string> values, FieldPresentationFormats format) { return string.Join(", ", values); }
/// <summary> /// Formats a value in the specified field presentation format. /// </summary> /// <param name="values"> /// The values to format. /// </param> /// <param name="format"> /// The format to present the value in. /// </param> /// <returns> /// The formatted value. /// </returns> public string FormatValue(IEnumerable <string> values, FieldPresentationFormats format) { var instance = new T(); return(instance.FormatValue(values ?? new string[0], format)); }