ConfigurableResponseNegotiator<TOptions> Class
Definition
- Namespace
- Codebelt.Extensions.Carter.Response
- Assemblies
- Codebelt.Extensions.Carter.dll
Provides an abstract, configurable base class for Carter response negotiators that serialize models using a StreamFormatter<TOptions>.
public abstract class ConfigurableResponseNegotiator<TOptions> : Configurable<TOptions>, IConfigurable<TOptions>, IResponseNegotiator where TOptions : class, IExceptionDescriptorOptions, IContentNegotiation, IValidatableParameterObject, new()
Type Parameters
TOptionsThe type of the configured options.
- Inheritance
-
Configurable<TOptions>ConfigurableResponseNegotiator<TOptions>
- Implements
-
IConfigurable<TOptions>
- Derived
- Inherited Members
Constructors
| Name | Description |
|---|---|
| ConfigurableResponseNegotiator(TOptions) | Initializes a new instance of the ConfigurableResponseNegotiator<TOptions> class. |
Properties
| Name | Description |
|---|---|
| ContentType | Gets the matched content type determined by the most recent successful call to CanHandle(MediaTypeHeaderValue). |
Methods
| Name | Description |
|---|---|
| CanHandle(MediaTypeHeaderValue) | Determines whether this negotiator can handle the specified |
| GetDefaultEncoding() | When overridden in a derived class, returns the default character encoding for this negotiator.
This encoding is used as the fallback by GetEncoding(HttpRequest) when the HTTP request does not
specify a resolvable |
| GetEncoding(HttpRequest) | Resolves the character encoding for the HTTP response by inspecting the |
| GetFormatter() | When overridden in a derived class, returns the StreamFormatter<TOptions> used to serialize the response model. |
| Handle<T>(HttpRequest, HttpResponse, T, CancellationToken) | Serializes the specified |