Refit.FormField<TBody>
Describes a single form-url-encoded field for a strongly-typed body, allowing source-generated code to
flatten a form body without reflection. The getter and all naming metadata are resolved at compile time
by the Refit source generator; the runtime only formats the value using the configured
RefitSettings.
Gets the declared CLR property name.
Gets the explicit collection format, or null to use the settings default.
Gets the value format string, if any.
Gets the delegate that reads the property value from a body instance.
Gets the compile-time explicit and serializer-specific field names.
Gets the precomputed prefix + delimiter prepended to the field name, if any.
Gets a value indicating whether a null value should be serialized as an empty field.
public FormField(Func<TBody, object> getter, string clrName, FormFieldNames names, string prefixSegment, string format, CollectionFormat? collectionFormat, bool serializeNull)
Initializes a new instance of the FormField<T> class.
public string ResolveFieldName(IUrlParameterKeyFormatter urlParameterKeyFormatter, ContentSerializerNameStyle nameStyle)
Resolves the form field name, applying the key formatter and any prefix.