static string?RenderAsFormattable( IProperty property, IPropertyContainer container, PropertyRendererOptions options, string format, IFormatProvider?formatProvider) { SearchOptions searchOptions = options.SearchOptions ?? container.SearchOptions.UseDefaultValue(false).ReturnNull(); object? valueUntyped = container.GetValueUntyped(property, searchOptions); if (valueUntyped == null) { return(options.NullValue); } if (valueUntyped is IFormattable formattable) { return(formattable.ToString(format, formatProvider ?? CultureInfo.InvariantCulture)); } return(valueUntyped.DefaultFormatValue()); }
/// <inheritdoc /> public object GetValueUntyped(IProperty property, bool searchInParent = true) => _propertyContainer.GetValueUntyped(property, searchInParent);