ODataFormattingAttribute 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.
An attribute to be placed on controllers that enables the OData formatters.
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
public class ODataFormattingAttribute : Attribute, System.Web.Http.Controllers.IControllerConfiguration
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
public class ODataFormattingAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)>]
type ODataFormattingAttribute = class
inherit Attribute
interface IControllerConfiguration
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)>]
type ODataFormattingAttribute = class
inherit Attribute
Public Class ODataFormattingAttribute
Inherits Attribute
Implements IControllerConfiguration
Public Class ODataFormattingAttribute
Inherits Attribute
- Inheritance
-
ODataFormattingAttribute
- Attributes
- Implements
-
System.Web.Http.Controllers.IControllerConfiguration
Remarks
This attribute does the following actions:
- It inserts the ODataMediaTypeFormatters into the System.Web.Http.Controllers.HttpControllerSettings.Formatters collection.
- It attaches the request to the OData formatter instance.
Constructors
ODataFormattingAttribute() |
Methods
CreateODataFormatters() |
Creates the OData formatters. |
Initialize(HttpControllerSettings, HttpControllerDescriptor) |
Callback invoked to set per-controller overrides for this controllerDescriptor. |