TextOutputFormatter.SelectCharacterEncoding Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines the best Encoding amongst the supported encodings for reading or writing an HTTP entity body based on the provided content type.
public:
virtual System::Text::Encoding ^ SelectCharacterEncoding(Microsoft::AspNetCore::Mvc::Formatters::OutputFormatterWriteContext ^ context);
public virtual System.Text.Encoding SelectCharacterEncoding (Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context);
abstract member SelectCharacterEncoding : Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext -> System.Text.Encoding
override this.SelectCharacterEncoding : Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext -> System.Text.Encoding
Public Overridable Function SelectCharacterEncoding (context As OutputFormatterWriteContext) As Encoding
Parameters
- context
- OutputFormatterWriteContext
The formatter context associated with the call.
Returns
The Encoding to use when reading the request or writing the response.