FormatFilter Class
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.
A filter that will use the format value in the route data or query string to set the content type on an ObjectResult returned from an action.
public ref class FormatFilter : Microsoft::AspNetCore::Mvc::Filters::IResourceFilter, Microsoft::AspNetCore::Mvc::Filters::IResultFilter, Microsoft::AspNetCore::Mvc::Formatters::Internal::IFormatFilter
public ref class FormatFilter : Microsoft::AspNetCore::Mvc::Filters::IResourceFilter, Microsoft::AspNetCore::Mvc::Filters::IResultFilter
public class FormatFilter : Microsoft.AspNetCore.Mvc.Filters.IResourceFilter, Microsoft.AspNetCore.Mvc.Filters.IResultFilter, Microsoft.AspNetCore.Mvc.Formatters.Internal.IFormatFilter
public class FormatFilter : Microsoft.AspNetCore.Mvc.Filters.IResourceFilter, Microsoft.AspNetCore.Mvc.Filters.IResultFilter
type FormatFilter = class
interface IFormatFilter
interface IFilterMetadata
interface IResourceFilter
interface IResultFilter
type FormatFilter = class
interface IFilterMetadata
interface IResourceFilter
interface IResultFilter
Public Class FormatFilter
Implements IFormatFilter, IResourceFilter, IResultFilter
Public Class FormatFilter
Implements IResourceFilter, IResultFilter
- Inheritance
-
FormatFilter
- Implements
-
IFilterMetadata IResourceFilter IResultFilter Microsoft.AspNetCore.Mvc.Formatters.Internal.IFormatFilter
Constructors
FormatFilter(IOptions<MvcOptions>, ILoggerFactory) |
Initializes an instance of FormatFilter. |
FormatFilter(IOptions<MvcOptions>) |
Obsolete.
Initializes an instance of FormatFilter. |
Methods
GetFormat(ActionContext) | Microsoft.AspNetCore.Mvc.Formatters.Internal.IFormatFilter.GetFormat(Microsoft.AspNetCore.Mvc.ActionContext) |
OnResourceExecuted(ResourceExecutedContext) |
Executes the resource filter. Called after execution of the remainder of the pipeline. |
OnResourceExecuting(ResourceExecutingContext) |
As a IResourceFilter, this filter looks at the request and rejects it before going ahead if
|
OnResultExecuted(ResultExecutedContext) |
Called after the action result executes. |
OnResultExecuting(ResultExecutingContext) |
Sets a Content Type on an ObjectResult using a format value from the request. |