Jaa


ODataFormattingAttribute Class

Definition

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:

  1. It inserts the ODataMediaTypeFormatters into the System.Web.Http.Controllers.HttpControllerSettings.Formatters collection.
  2. 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.

Applies to