(Choose 1 answer)
How to create a custom formatter class in ASP.NET Core Web API?
A. 1. Derive the class from the appropriate base class (could be TextOutputFormatter and TextInputFormatter).
2. Specify valid media types and encodings in the constructor.
3. Override the CanReadType and CanWriteType methods.
4. Override the ReadRequestBodyAsync and WriteResponseBody Async methods.
B. 1. Specify valid media types and encodings in the constructor.
2. Derive the class from the appropriate base class (could be TextOutputFormatter and TextInputFormatter).
3. Override the CanReadType and CanWriteType methods.4. Override the ReadRequestBodyAsync and WriteResponseBody Async methods.
C. 1. Override the CanReadType and CanWriteType methods.
2. Override the ReadRequestBodyAsync and WriteResponseBody Async methods.
3. Derive the class from the appropriate base class (could be TextOutputFormatter and TextInputFormatter).
4. Specify valid media types and encodings in the constructor.
D. None of these
El 30