Sdílet prostřednictvím


ODataFormattingAttribute Třída

Definice

Atribut, který má být umístěn na kontrolery, které umožňují formátovací moduly OData.

[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
Dědičnost
ODataFormattingAttribute
Atributy
Implementuje
System.Web.Http.Controllers.IControllerConfiguration

Poznámky

Tento atribut provede následující akce:

  1. Vloží ODataMediaTypeFormatters do System.Web.Http.Controllers.HttpControllerSettings.Formatters kolekce.
  2. Připojí požadavek k instanci formátovače OData.

Konstruktory

ODataFormattingAttribute()

Atribut, který má být umístěn na kontrolery, které umožňují formátovací moduly OData.

Metody

CreateODataFormatters()

Vytvoří formátovací moduly OData.

Initialize(HttpControllerSettings, HttpControllerDescriptor)

Zpětné volání bylo vyvoláno k nastavení přepsání podle kontroleru pro tento popisovač controllerDescriptor.

Platí pro