public static PrintingConfig <TOwner> Using <TOwner, TPropType>(this PropertyPrintingConfig <TOwner, TPropType> propConfig, CultureInfo culture) where TPropType : IFormattable { var config = ((IPropertyPrintingConfig <TOwner, TPropType>)propConfig).ParentConfig; config.SetCultureForFormattable <TPropType>(culture); return(config); }
public static PrintingConfig <TOwner> TrimmedToLength <TOwner>(this PropertyPrintingConfig <TOwner, string> propConfig, int maxLen) { var propertyPrintingConfig = (IPropertyPrintingConfig <TOwner, string>)propConfig; var config = propertyPrintingConfig.ParentConfig; var propertyName = propertyPrintingConfig.PropertyName; config.SetTrimmingLength(propertyName, maxLen); return(config); }