<PackageReference Include="Refit" Version="17.0.0" />

Refit.FormField<TBody>

public sealed class 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.
public string ClrName { get; }

Gets the declared CLR property name.

Gets the explicit collection format, or null to use the settings default.

public string Format { get; }

Gets the value format string, if any.

public Func<TBody, object> Getter { get; }

Gets the delegate that reads the property value from a body instance.

public FormFieldNames Names { get; }

Gets the compile-time explicit and serializer-specific field names.

public string PrefixSegment { get; }

Gets the precomputed prefix + delimiter prepended to the field name, if any.

public bool SerializeNull { get; }

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.