public static PrintingConfig <TOwner> TrimmedToLength <TOwner>( this MemberPrintingConfig <TOwner, string> propConfig, int maxLength) { return(propConfig.SetSerializer(str => str.Substring(0, Math.Min(str.Length, maxLength)))); }
public static PrintingConfig <TOwner> SetCulture <TOwner, TProperty>( this MemberPrintingConfig <TOwner, TProperty> propConfig, CultureInfo culture) where TProperty : IFormattable { return(propConfig.SetSerializer(x => ((IFormattable)x).ToString("N", culture))); }