ValueFormatter Class
Base class for formatters that format values based on media type.
public abstract class ValueFormatterConstructors
| Name | Description |
|---|---|
| ValueFormatter() |
ValueFormatter()
protected ValueFormatter()No documentation is available.
Methods
| Name | Description |
|---|---|
| Format(HumanReadableTextWriter, string?, HumanReadableSerializerOptions) | Formats the specified value and writes it to the writer. |
Format(HumanReadableTextWriter, string?, HumanReadableSerializerOptions)
Formats the specified value and writes it to the writer.
public abstract void Format(HumanReadableTextWriter writer, string? value, HumanReadableSerializerOptions options)Parameters
writerHumanReadableTextWriter- The writer to write to.
valuestring?- The value to format.
optionsHumanReadableSerializerOptions- The serialization options.
Constants
| Name | Description |
|---|---|
| CssMediaTypeName | The media type name for CSS. |
| HtmlMediaTypeName | The media type name for HTML. |
| JavascriptMediaTypeName | The media type name for JavaScript. |
| JsonMediaTypeName | The media type name for JSON. |
| WwwFormUrlEncodedMediaTypeName | The media type name for URL-encoded form data. |
| XmlMediaTypeName | The media type name for XML. |
CssMediaTypeName
The media type name for CSS.
public const string CssMediaTypeName = "text/css"HtmlMediaTypeName
The media type name for HTML.
public const string HtmlMediaTypeName = "text/html"JavascriptMediaTypeName
The media type name for JavaScript.
public const string JavascriptMediaTypeName = "text/javascript"JsonMediaTypeName
The media type name for JSON.
public const string JsonMediaTypeName = "application/json"WwwFormUrlEncodedMediaTypeName
The media type name for URL-encoded form data.
public const string WwwFormUrlEncodedMediaTypeName = "application/x-www-form-urlencoded"XmlMediaTypeName
The media type name for XML.
public const string XmlMediaTypeName = "application/xml"