Freigeben über


ODataUtils.SetHttpMethod-Methode

Legt die HttpMethod-Anmerkung des annotatable-Elements auf httpMethod fest.

Namespace:  Microsoft.Data.OData
Assembly:  Microsoft.Data.OData (in Microsoft.Data.OData.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Sub SetHttpMethod ( _
    model As IEdmModel, _
    annotatable As IEdmElement, _
    httpMethod As String _
)
'Usage
Dim model As IEdmModel
Dim annotatable As IEdmElement
Dim httpMethod As String

model.SetHttpMethod(annotatable, _
    httpMethod)
public static void SetHttpMethod(
    this IEdmModel model,
    IEdmElement annotatable,
    string httpMethod
)
[ExtensionAttribute]
public:
static void SetHttpMethod(
    IEdmModel^ model, 
    IEdmElement^ annotatable, 
    String^ httpMethod
)
static member SetHttpMethod : 
        model:IEdmModel * 
        annotatable:IEdmElement * 
        httpMethod:string -> unit 
public static function SetHttpMethod(
    model : IEdmModel, 
    annotatable : IEdmElement, 
    httpMethod : String
)

Parameter

  • httpMethod
    Typ: System.String
    Der HttpMethod-Wert, der als Anmerkungswert festgelegt werden soll; bei NULL wird eine vorhandene Anmerkung entfernt.

Hinweis zur Verwendung

In Visual Basic und C# können Sie die Methode als Instanzenmethode für jedes Objekt vom Typ IEdmModel aufrufen. Wenn Sie Instanzmethodensyntax zum Aufruf dieser Methode verwenden, vernachlässigen Sie den ersten Parameter. Weitere Informationen finden Sie unter https://msdn.microsoft.com/de-de/library/bb384936(v=vs.103) oder https://msdn.microsoft.com/de-de/library/bb383977(v=vs.103).

Hinweise

Die HttpMethod-Anmerkung wird nur in Dienstvorgängen zu Serialisierungszwecken unterstützt.

Siehe auch

Verweis

ODataUtils Klasse

Microsoft.Data.OData-Namespace