Udostępnij za pośrednictwem


ODataFormattingAttribute Klasa

Definicja

Atrybut do umieszczenia na kontrolerach, który umożliwia formatery 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
Dziedziczenie
ODataFormattingAttribute
Atrybuty
Implementuje
System.Web.Http.Controllers.IControllerConfiguration

Uwagi

Ten atrybut wykonuje następujące akcje:

  1. Wstawia on element ODataMediaTypeFormatters do kolekcji System.Web.Http.Controllers.HttpControllerSettings.Formatters .
  2. Dołącza żądanie do wystąpienia formatu OData.

Konstruktory

ODataFormattingAttribute()

Atrybut do umieszczenia na kontrolerach, który umożliwia formatery OData.

Metody

CreateODataFormatters()

Tworzy formatery OData.

Initialize(HttpControllerSettings, HttpControllerDescriptor)

Wywołanie zwrotne wywoływane w celu ustawienia przesłonięć kontrolera dla tego kontroleraDescriptor.

Dotyczy