FormatFilterAttribute Class

Summary

A filter which will use the format value in the route data or query string to set the content type on an [Microsoft.AspNet.Mvc.ObjectResult]() returned from an action.

Syntax

public class FormatFilterAttribute : Attribute, _Attribute, IFilterFactory, IFilter

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.FormatFilterAttribute

Methods

CreateInstance(System.IServiceProvider)

Creates an instance of [Microsoft.AspNet.Mvc.FormatFilter](Microsoft.AspNet.Mvc.FormatFilter.yml)

Arguments:
  • serviceProvider (System.IServiceProvider) – The [System.IServiceProvider]()
Return type:

Microsoft.AspNet.Mvc.IFilter

Returns:

An instance of [Microsoft.AspNet.Mvc.FormatFilter](Microsoft.AspNet.Mvc.FormatFilter.yml)

public IFilter CreateInstance(IServiceProvider serviceProvider)